]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: Added missing check of msg length in verifying its signature
authorPaul Blakey <paulb@mellanox.com>
Thu, 18 Aug 2016 18:09:05 +0000 (21:09 +0300)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 Sep 2016 09:14:09 +0000 (11:14 +0200)
commit522a16c9b6f120dd4fdfdfdf925a64128923e1a6
tree9c1911a1cd01971b723996d6487271a17c4e038e
parent1f25ea564d810767b4ce3302530156dd5ddaa0f4
net/mlx5: Added missing check of msg length in verifying its signature

[ Upstream commit 2c0f8ce1b584a4d7b8ff53140d21dfed99834940 ]

Set and verify signature calculates the signature for each of the
mailbox nodes, even for those that are unused (from cache). Added
a missing length check to set and verify only those which are used.

While here, also moved the setting of msg's nodes token to where we
already go over them. This saves a pass because checksum is disabled,
and the only useful thing remaining that set signature does is setting
the token.

Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB
adapters')
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c