]> 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)
commit93dc9cd4d1400a464afb8deeb550bd8296701e99
tree1b923f9e883b12a36643c43211213a5aec8e3d63
parent5416bc847a55be6eb0b2af2dd3f4ab176f4c3f8c
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: e1c71dcfaa20 ("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