udf: Verify symlink size before loading it
authorJan Kara <jack@suse.cz>
Fri, 19 Dec 2014 11:21:47 +0000 (12:21 +0100)
committerJan Kara <jack@suse.cz>
Fri, 19 Dec 2014 12:17:10 +0000 (13:17 +0100)
commita1d47b262952a45aae62bd49cfaf33dd76c11a2c
tree92c3c45e582c0fb7f160ecfd0126dc6a612a879b
parente159332b9af4b04d882dbcfe1bb0117f0a6d4b58
udf: Verify symlink size before loading it

UDF specification allows arbitrarily large symlinks. However we support
only symlinks at most one block large. Check the length of the symlink
so that we don't access memory beyond end of the symlink block.

CC: stable@vger.kernel.org
Reported-by: Carl Henrik Lunde <chlunde@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/symlink.c