linux/fs/udf
Alden Tondettar a47241cdee udf: Prevent stack overflow on corrupted filesystem mount
Presently, a corrupted or malicious UDF filesystem containing a very large
number (or cycle) of Logical Volume Integrity Descriptor extent
indirections may trigger a stack overflow and kernel panic in
udf_load_logicalvolint() on mount.

Replace the unnecessary recursion in udf_load_logicalvolint() with
simple iteration. Set an arbitrary limit of 1000 indirections (which would
have almost certainly overflowed the stack without this fix), and treat
such cases as if there were no LVID.

Signed-off-by: Alden Tondettar <alden.tondettar@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2016-04-26 08:25:07 +02:00
..
Kconfig udf: Update Kconfig description 2015-01-05 11:04:37 +01:00
Makefile switch udf to simple_fsync() 2009-06-11 21:36:13 -04:00
balloc.c udf: Factor out code for creating indirect extent 2015-12-23 18:04:52 +01:00
dir.c udf: Use separate buffer for copying split names 2016-02-09 13:05:23 +01:00
directory.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
ecma_167.h Remove struct typedefs from fs/udf/ecma_167.h et al. 2009-04-02 12:29:47 +02:00
file.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
ialloc.c udf: saner calling conventions for udf_new_inode() 2014-09-04 21:37:41 +02:00
inode.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
lowlevel.c udf: use linux/uaccess.h 2014-07-15 22:40:23 +02:00
misc.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
namei.c udf: Use separate buffer for copying split names 2016-02-09 13:05:23 +01:00
osta_udf.h Remove struct typedefs from fs/udf/ecma_167.h et al. 2009-04-02 12:29:47 +02:00
partition.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
super.c udf: Prevent stack overflow on corrupted filesystem mount 2016-04-26 08:25:07 +02:00
symlink.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
truncate.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
udf_i.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
udf_sb.h udf: Fortify LVID loading 2013-09-24 11:23:33 +02:00
udfdecl.h udf: Fix conversion of 'dstring' fields to UTF8 2016-04-25 15:18:50 +02:00
udfend.h Remove struct typedefs from fs/udf/ecma_167.h et al. 2009-04-02 12:29:47 +02:00
udftime.c udf: remove redundant sys_tz declaration 2014-09-29 13:45:12 +02:00
unicode.c udf: Fix conversion of 'dstring' fields to UTF8 2016-04-25 15:18:50 +02:00