]> git.baikalelectronics.ru Git - kernel.git/commit
udf: Avoid infinite loop when processing indirect ICBs
authorJan Kara <jack@suse.cz>
Thu, 4 Sep 2014 12:06:55 +0000 (14:06 +0200)
committerJan Kara <jack@suse.cz>
Thu, 4 Sep 2014 12:12:29 +0000 (14:12 +0200)
commit58934de90b669417dbc3d06cc87960e6f4776ed3
treeba1f7d3c1e99b262f43a1c2fa39aaf57701c664c
parent21c8a3ae25db450bf1a1d23f56e6c021f22d7d55
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>
fs/udf/inode.c