]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
udf: Verify symlink size before loading it
authorJan Kara <jack@suse.cz>
Fri, 19 Dec 2014 11:21:47 +0000 (12:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2015 18:27:49 +0000 (10:27 -0800)
commit974d3824af6b030ab9cf689918c8604ebc4df769
treeb9d67647dd5b9d1c4f6fd0535b64c055a8b081e5
parente96481cab033266582fbad6751f15ac4411bfced
udf: Verify symlink size before loading it

commit a1d47b262952a45aae62bd49cfaf33dd76c11a2c upstream.

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.

Reported-by: Carl Henrik Lunde <chlunde@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/udf/symlink.c