]> git.baikalelectronics.ru Git - kernel.git/commit
omfs: fix oops when file metadata is corrupted
authorBob Copeland <me@bobcopeland.com>
Fri, 15 Aug 2008 07:40:47 +0000 (00:40 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Aug 2008 15:35:44 +0000 (08:35 -0700)
commitcd2b17cae222d289faf9d9e1974971b69b76632b
tree532606ac97d86d8952ffcdd8f8513b1499c10bf8
parent553547655c528df618e3abff8260f885317cb4c1
omfs: fix oops when file metadata is corrupted

A fuzzed fileystem image failed with OMFS when the extent count was
used in a loop without being checked against the max number of extents.
It also provoked a signed division for an array index that was checked
as if unsigned, leading to index by -1.

omfsck will be updated to fix these cases, in the meantime bail out
gracefully.

Reported-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/omfs/bitmap.c
fs/omfs/file.c