isofs: Fix infinite looping over CE entries
authorJan Kara <jack@suse.cz>
Mon, 15 Dec 2014 13:22:46 +0000 (14:22 +0100)
committersungmin ha <sungmin82.ha@samsung.com>
Wed, 11 Mar 2015 10:49:45 +0000 (19:49 +0900)
commit0106547004ef5da4b572801e87ce8aff4473c4e6
tree2f7e00cd64a27b30ab38b53220956298d5bd563e
parent61ba99828b3004ec199010cf404eb30937cbf884
isofs: Fix infinite looping over CE entries

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.

Change-Id: Ia0475fc07ee3e8ecc1d53673439f32c175acc10b
Reported-by: P J P <ppandit@redhat.com>
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
fs/isofs/rock.c