udf: Verify i_size when loading inode
authorJan Kara <jack@suse.cz>
Fri, 19 Dec 2014 11:03:53 +0000 (12:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 18 Sep 2015 11:51:54 +0000 (13:51 +0200)
commit343fc5b21af325214a4b51c2942427fb6169f412
tree6a76191f59ad401417cae2109882eea328420007
parentd8b3be1ede7a9559cef59f8066ba90a17f989dd8
udf: Verify i_size when loading inode

commit e159332b9af4b04d882dbcfe1bb0117f0a6d4b58 upstream.

Verify that inode size is sane when loading inode with data stored in
ICB. Otherwise we may get confused later when working with the inode and
inode size is too big.

Reported-by: Carl Henrik Lunde <chlunde@ping.uio.no>
Signed-off-by: Jan Kara <jack@suse.cz>
[bwh: Backported to 2.6.32: on error, call make_bad_inode() then return]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
CVE-2014-9728, CVE-2014-9729

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