android_kernel_samsung_msm8976/include
Ryusuke Konishi c043edcc42 nilfs2: fix sanity check of btree level in nilfs_btree_root_broken()
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>
2015-05-17 09:51:32 -07:00
..
acpi ACPICA: Utilities: split IO address types from data type models. 2015-05-06 21:56:26 +02:00
asm-generic nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 21:56:28 +02:00
clocksource clocksource: arch_timer: use virtual counters 2014-01-09 12:24:26 -08:00
crypto crypto: scatterwalk - Use sg_chain_ptr on chain entries 2013-12-11 22:36:29 -08:00
drm drm/radeon: remove invalid pci id 2014-11-14 08:48:00 -08:00
dt-bindings
keys
linux nilfs2: fix sanity check of btree level in nilfs_btree_root_broken() 2015-05-17 09:51:32 -07:00
math-emu
media media: vb2: fix VBI/poll regression 2014-10-09 12:18:42 -07:00
memory
misc
net ipv4: tcp: get rid of ugly unicast_sock 2015-02-26 17:48:48 -08:00
pcmcia
ras
rdma
rxrpc
scsi scsi: fix our current target reap infrastructure 2014-05-30 21:52:11 -07:00
sound ALSA: emu10k1: Emu10k2 32 bit DMA mode 2015-05-13 05:15:41 -07:00
target target: Report correct response length for some commands 2014-06-30 20:09:45 -07:00
trace tracing: Fix syscall_*regfunc() vs copy_process() race 2014-07-06 18:54:16 -07:00
uapi netfilter: xt_bpf: add mising opaque struct sk_filter definition 2014-11-21 09:22:54 -08:00
video
xen
Kbuild