Whamcloud - gitweb
libext2fs: fix the s_log_block_size check in ext2fs_open()
authorTheodore Ts'o <tytso@mit.edu>
Mon, 17 Jul 2017 23:55:39 +0000 (19:55 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 17 Jul 2017 23:55:39 +0000 (19:55 -0400)
commit74da94f3bf240bb8ad1b57a94a8f94fa3050e906
treef8acfec37ab2e4766a18408ca3850db4c0a28993
parent2971e14beafea43d9428de2ffe98f8f42f4eb24e
libext2fs: fix the s_log_block_size check in ext2fs_open()

The s_log_block_check can fail to detect an invalid value if it is
between UINT_MAX-9 and UINT_MAX, which can lead to ext2fs_open()
crashing with a division by zero error.

This bug was found using American Fuzzy Lop: http://lcamtuf.coredump.cx/afl/

Addresses-Debian-Bug: #868489

Reported-by: jwilk@jwilk.net
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/openfs.c