]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Protect QUERY_PORT wrapper from untrusted guests
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Tue, 30 Sep 2014 09:03:49 +0000 (12:03 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 20:27:49 +0000 (16:27 -0400)
commite4b45614208da8f98fad253b8c70fd4477a5f453
treeacabc4f35d537d90a2f33f7c85f1d6485c038398
parentaee851ee0825b647e6791f1359e410d3579fbd9d
net/mlx4_core: Protect QUERY_PORT wrapper from untrusted guests

The function mlx4_QUERY_PORT_wrapper implements only the
QUERY_PORT "general" case (opcode modifier = 0).

Verify that the opcode modifier is zero, and also that the
input modifier contains only the port number in bits 0..7
(all other bits should be zero).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/fw.c