]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mad: Check hop count field in directed route MAD to avoid array overflow
authorRoland Dreier <rolandd@cisco.com>
Sun, 6 Sep 2009 03:24:10 +0000 (20:24 -0700)
committerRoland Dreier <rolandd@cisco.com>
Sun, 6 Sep 2009 03:24:10 +0000 (20:24 -0700)
commit2f29a5e749921270139ce457b0a157a61cc7224d
tree318e85dba297fe9eff4c633073426509e093f834
parentaf573a6e6b12221a22975dc4f010c088fff744fd
IB/mad: Check hop count field in directed route MAD to avoid array overflow

The hop count field in a directed route MAD is only allowed to be in the
range 0 to 63 (by spec).  Check that this really is the case to avoid
accessing outside the bounds of the hop array.

Reported-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/smi.c