]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-Switch, Fix out of bound access when setting vport rate
authorEran Ben Elisha <eranbe@mellanox.com>
Sun, 16 Sep 2018 11:45:27 +0000 (14:45 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 1 Oct 2018 17:58:00 +0000 (10:58 -0700)
commit89167969f081d9b10919f3db55dc9e0348f0b3d3
treedf3ff657279c6cf5ffc6163a4976d768c5a47038
parent97c42e84100edaa31e7fef8a8542161db94ee380
net/mlx5: E-Switch, Fix out of bound access when setting vport rate

The code that deals with eswitch vport bw guarantee was going beyond the
eswitch vport array limit, fix that.  This was pointed out by the kernel
address sanitizer (KASAN).

The error from KASAN log:
[2018-09-15 15:04:45] BUG: KASAN: slab-out-of-bounds in
mlx5_eswitch_set_vport_rate+0x8c1/0xae0 [mlx5_core]

Fixes: a383cbe0c7b0 ("net/mlx5: Add support for setting VF min rate")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c