]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Mon, 13 Oct 2014 14:09:18 +0000 (16:09 +0200)
commit8ec4e9789b8b4c05ee979daad2a27088e29fac5d
tree4f178c9afa0c952e5deaaffd8a7833a7ff8a6a87
parent5685ae089da74713b5d2f487fd20e151e347f440
udf: Avoid infinite loop when processing indirect ICBs

commit c03aa9f6e1f938618e6db2e23afef0574efeeb65 upstream.

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>
Cc: Chuck Ebbert <cebbert.lkml@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/udf/inode.c