ore: Fix out-of-bounds access in _ios_obj()
authorBoaz Harrosh <bharrosh@panasas.com>
Wed, 1 Aug 2012 14:48:36 +0000 (17:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2012 15:10:09 +0000 (08:10 -0700)
commit59c5bc1eb294df764567e29630dacbd04cb1e8ab
tree315eb8cf33224b443478e42229fbd441f79f5d91
parent8b0331a46c6aa9f853e1208b0ce137c4d1d4fc1a
ore: Fix out-of-bounds access in _ios_obj()

commit 9e62bb4458ad2cf28bd701aa5fab380b846db326 upstream.

_ios_obj() is accessed by group_index not device_table index.

The oc->comps array is only a group_full of devices at a time
it is not like ore_comp_dev() which is indexed by a global
device_table index.

This did not BUG until now because exofs only uses a single
COMP for all devices. But with other FSs like PanFS this is
not true.

This bug was only in the write_path, all other users were
using it correctly

[This is a bug since 3.2 Kernel]

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/exofs/ore.c