udf: limit the maximum number of indirect extents in a row
authorVegard Nossum <vegard.nossum@oracle.com>
Fri, 11 Dec 2015 14:54:16 +0000 (15:54 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 1 Feb 2016 17:39:42 +0000 (12:39 -0500)
commit4476dc677064d27c1fb6ff28a47eeac384e8ba64
treef64a82227463b49bf6d4567ecde1dc50a330fd1c
parenta2da01ce927dd98cb8f1a8f2d2343d2f5827b988
udf: limit the maximum number of indirect extents in a row

[ Upstream commit b0918d9f476a8434b055e362b83fa4fd1d462c3f ]

udf_next_aext() just follows extent pointers while extents are marked as
indirect. This can loop forever for corrupted filesystem. Limit number
the of indirect extents we are willing to follow in a row.

[JK: Updated changelog, limit, style]

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Cc: stable@vger.kernel.org
Cc: Jan Kara <jack@suse.com>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/udf/inode.c