]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e/core/en_fs: fix pointer dereference after free in mlx5e_execute_l2_action
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Sun, 5 Nov 2017 03:54:53 +0000 (22:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Nov 2017 01:41:32 +0000 (10:41 +0900)
commit39a4b86f0de4ce5024985a56fc39b16194b04313
tree57d0550e5ea32b7c51ae340d18d8c8a961db8267
parent13c249a94f525fe4c757d28854049780b25605c4
net/mlx5e/core/en_fs: fix pointer dereference after free in mlx5e_execute_l2_action

hn is being kfree'd in mlx5e_del_l2_from_hash and then dereferenced
by accessing hn->ai.addr

Fix this by copying the MAC address into a local variable for its safe use
in all possible execution paths within function mlx5e_execute_l2_action.

Addresses-Coverity-ID: 1417789
Fixes: eeb66cdb6826 ("net/mlx5: Separate between E-Switch and MPFS")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c