]> 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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 7 Jan 2015 16:55:18 +0000 (17:55 +0100)
commit2bf2e3b94225c76d7990acc7579fecd6306d0a3a
treea885a27dec8cabb076b353c12fb1e9648645ba57
parent259c1c876ea03d24f0d8eaccb122a7733607bd34
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: Jiri Slaby <jslaby@suse.cz>
fs/udf/symlink.c