isofs: Fix unchecked printing of ER records
authorJan Kara <jack@suse.cz>
Thu, 18 Dec 2014 16:26:10 +0000 (17:26 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 20 Feb 2015 00:49:32 +0000 (00:49 +0000)
commit48c47581acba6c3cc9739b33a1107c5446db0a82
tree6c9d66ff8d1243b617f18cb4fe3bf688f8d51c42
parent8834274cd3303c5d1602ea1d45291598f05652e5
isofs: Fix unchecked printing of ER records

commit 4e2024624e678f0ebb916e6192bd23c1f9fdf696 upstream.

We didn't check length of rock ridge ER records before printing them.
Thus corrupted isofs image can cause us to access and print some memory
behind the buffer with obvious consequences.

Reported-and-tested-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>
fs/isofs/rock.c