]> git.baikalelectronics.ru Git - kernel.git/commit
hpfs: better test for errors
authorMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Thu, 4 Jul 2013 16:42:29 +0000 (18:42 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Jul 2013 18:22:46 +0000 (11:22 -0700)
commit2a4100027363eb25e2ddef7d077d437b6a6b9d20
treebb53d02c15568b0932c2f5ef5e758955b4fa69d0
parenteb6bee485a40207ec7a4296bc3fde51eb671dedc
hpfs: better test for errors

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>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hpfs/map.c
fs/hpfs/super.c