mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
c043edcc42
commit d8fd150fe3935e1692bf57c66691e17409ebb9c1 upstream. The range check for b-tree level parameter in nilfs_btree_root_broken() is wrong; it accepts the case of "level == NILFS_BTREE_LEVEL_MAX" even though the level is limited to values in the range of 0 to (NILFS_BTREE_LEVEL_MAX - 1). Since the level parameter is read from storage device and used to index nilfs_btree_path array whose element count is NILFS_BTREE_LEVEL_MAX, it can cause memory overrun during btree operations if the boundary value is set to the level parameter on device. This fixes the broken sanity check and adds a comment to clarify that the upper bound NILFS_BTREE_LEVEL_MAX is exclusive. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
alloc.c | ||
alloc.h | ||
bmap.c | ||
bmap.h | ||
btnode.c | ||
btnode.h | ||
btree.c | ||
btree.h | ||
cpfile.c | ||
cpfile.h | ||
dat.c | ||
dat.h | ||
dir.c | ||
direct.c | ||
direct.h | ||
export.h | ||
file.c | ||
gcinode.c | ||
ifile.c | ||
ifile.h | ||
inode.c | ||
ioctl.c | ||
Kconfig | ||
Makefile | ||
mdt.c | ||
mdt.h | ||
namei.c | ||
nilfs.h | ||
page.c | ||
page.h | ||
recovery.c | ||
segbuf.c | ||
segbuf.h | ||
segment.c | ||
segment.h | ||
sufile.c | ||
sufile.h | ||
super.c | ||
the_nilfs.c | ||
the_nilfs.h |