mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
net/mlx5e: TC, Fix use after free in mlx5e_clone_flow_attr_for_post_act()
This returns freed memory leading to a use after free. It's supposed to
return NULL.
Fixes: 8300f22526 ("net/mlx5e: Create new flow attr for multi table actions")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
24055bb879
commit
371c2b349d
|
|
@ -3410,7 +3410,7 @@ mlx5e_clone_flow_attr_for_post_act(struct mlx5_flow_attr *attr,
|
|||
if (!attr2 || !parse_attr) {
|
||||
kvfree(parse_attr);
|
||||
kfree(attr2);
|
||||
return attr2;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(attr2, attr, attr_sz);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user