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)
committerWilly Tarreau <w@1wt.eu>
Sat, 12 Mar 2016 13:25:43 +0000 (14:25 +0100)
commit7fb40bde70d2130605c489b36fcc65b17200b542
tree56d1534315b18edb35138f0c722ac5844e54f4da
parent140d24629ba0a885ca050d81a3407a5d8c982538
udf: limit the maximum number of indirect extents in a row

commit b0918d9f476a8434b055e362b83fa4fd1d462c3f upstream.

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: 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: Ben Hutchings <ben@decadent.org.uk>
[wt: udf_error() instead of udf_err() in 2.6.32]
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/udf/inode.c