udf: Check component length before reading it
authorJan Kara <jack@suse.cz>
Fri, 19 Dec 2014 13:27:55 +0000 (14:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 18 Sep 2015 11:51:56 +0000 (13:51 +0200)
commit56de771cef061319e172130ae71e281e340e13bd
tree4cda71ce0694df37f6f8dd7022fc0b5cc3a5d5e1
parent2897fe8d016c32b83a70a645a545d78152356f36
udf: Check component length before reading it

commit e237ec37ec154564f8690c5bd1795339955eeef9 upstream.

Check that length specified in a component of a symlink fits in the
input buffer we are reading. Also properly ignore component length for
component types that do not use it. Otherwise we read memory after end
of buffer for corrupted udf image.

Reported-by: Carl Henrik Lunde <chlunde@ping.uio.no>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
CVE-2014-9728, CVE-2014-9730

Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/udf/symlink.c