]> git.baikalelectronics.ru Git - kernel.git/commit
RDAM/netlink: Fix out-of-bound access while checking message validity
authorLeon Romanovsky <leon@kernel.org>
Fri, 8 Sep 2017 10:02:26 +0000 (13:02 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Sep 2017 17:01:03 +0000 (10:01 -0700)
commit674c7413794bae1ef9596b3c12ccff63525ae640
tree1b923f9e883b12a36643c43211213a5aec8e3d63
parent636de32e8186b7607690f300f428e983c3d2689c
RDAM/netlink: Fix out-of-bound access while checking message validity

The netlink message sent with type == 0, which doesn't have any client
behind it, caused to the overflow in max_num_ops array.

Fix it by declaring zero number of ops for the first client.

Fixes: 52c155fd14b3 ("RDMA/netlink: Remove netlink clients infrastructure")
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/infiniband/core/netlink.c