Repository navigation
Commit c03aa9f
committed
udf: Avoid infinite loop when processing indirect ICBs
We did not implement any bound on number of indirect ICBs we follow when
loading inode. Thus corrupted medium could cause kernel to go into an
infinite loop, possibly causing a stack overflow.
Fix the possible stack overflow by removing recursion from
__udf_read_inode() and limit number of indirect ICBs we follow to avoid
infinite loops.
Signed-off-by: Jan Kara <jack@suse.cz>1 parent bb7720a commit c03aa9f
1 file changed
Lines changed: 21 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1270 | 1270 | | |
1271 | 1271 | | |
1272 | 1272 | | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
1273 | 1280 | | |
1274 | 1281 | | |
1275 | 1282 | | |
| |||
1279 | 1286 | | |
1280 | 1287 | | |
1281 | 1288 | | |
| 1289 | + | |
1282 | 1290 | | |
| 1291 | + | |
1283 | 1292 | | |
1284 | 1293 | | |
1285 | 1294 | | |
| |||
1317 | 1326 | | |
1318 | 1327 | | |
1319 | 1328 | | |
1320 | | - | |
1321 | 1329 | | |
1322 | 1330 | | |
1323 | 1331 | | |
1324 | 1332 | | |
1325 | 1333 | | |
1326 | 1334 | | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
1339 | 1346 | | |
1340 | 1347 | | |
1341 | | - | |
| 1348 | + | |
1342 | 1349 | | |
1343 | 1350 | | |
1344 | 1351 | | |
| |||
0 commit comments