]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
isofs: Fix infinite looping over CE entries
authorJan Kara <jack@suse.cz>
Mon, 15 Dec 2014 13:22:46 +0000 (14:22 +0100)
committerZefan Li <lizefan@huawei.com>
Tue, 14 Apr 2015 09:33:47 +0000 (17:33 +0800)
commit96e44adce250199ec9b2b928be66365779ff1b59
tree348aa104584d0a23297d3746826a67b18f87b794
parent68aa0365a6a71c8fc4b2aaded74511c87614e1fb
isofs: Fix infinite looping over CE entries

commit f54e18f1b831c92f6512d2eedb224cd63d607d3d upstream.

Rock Ridge extensions define so called Continuation Entries (CE) which
define where is further space with Rock Ridge data. Corrupted isofs
image can contain arbitrarily long chain of these, including a one
containing loop and thus causing kernel to end in an infinite loop when
traversing these entries.

Limit the traversal to 32 entries which should be more than enough space
to store all the Rock Ridge data.

Reported-by: P J P <ppandit@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Zefan Li <lizefan@huawei.com>
fs/isofs/rock.c