hpfs: better test for errors
authorMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Thu, 4 Jul 2013 16:42:29 +0000 (18:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Jul 2013 18:03:40 +0000 (11:03 -0700)
commit5f855daf6487b64eae1f201483b5830f42b2e9bb
treeea7611865b0a3c52d3be717ece53e0f5e5ac14b1
parent46796ed300f4f9ffa297ff548f0e2f08b7614f3b
hpfs: better test for errors

commit 3ebacb05044f82c5f0bb456a894eb9dc57d0ed90 upstream.

The test if bitmap access is out of bound could errorneously pass if the
device size is divisible by 16384 sectors and we are asking for one bitmap
after the end.

Check for invalid size in the superblock. Invalid size could cause integer
overflows in the rest of the code.

Signed-off-by: Mikulas Patocka <mpatocka@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/hpfs/map.c
fs/hpfs/super.c