]> git.baikalelectronics.ru Git - kernel.git/commit
isofs: Fix unbounded recursion when processing relocated directories
authorJan Kara <jack@suse.cz>
Sun, 17 Aug 2014 09:49:57 +0000 (11:49 +0200)
committerJan Kara <jack@suse.cz>
Tue, 19 Aug 2014 16:29:30 +0000 (18:29 +0200)
commit3a3214bbe121d8d74d06bcbda0c221d7c70ec065
treebe3af2da6fcc9bd0ef2518e6d344d726670b2df7
parent179e0e4c759fe7f8215f8672a18ceddfc60d86d2
isofs: Fix unbounded recursion when processing relocated directories

We did not check relocated directory in any way when processing Rock
Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL
entry pointing to another CL entry leading to possibly unbounded
recursion in kernel code and thus stack overflow or deadlocks (if there
is a loop created from CL entries).

Fix the problem by not allowing CL entry to point to a directory entry
with CL entry (such use makes no good sense anyway) and by checking
whether CL entry doesn't point to itself.

CC: stable@vger.kernel.org
Reported-by: Chris Evans <cevans@google.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/isofs/inode.c
fs/isofs/isofs.h
fs/isofs/rock.c