[PATCH] net/mlx5: fix heap-buffer-overflow in sample group match
Raslan Darawsheh
rasland at nvidia.com
Tue Mar 24 13:26:45 CET 2026
Hi,
On 15/03/2026 10:44 AM, Shani Peretz wrote:
> The cached group match callback compares serialized actions
> using memcmp with the size of the new actions buffer.
> When the new actions serialize to a larger buffer than an existing
> cached entry, memcmp reads past the cached entry's heap allocation,
> causing a heap-buffer-overflow detected by AddressSanitizer.
>
> Add a size comparison before the memcmp so that entries with
> different serialized sizes are rejected as non-matching immediately,
> avoiding the out-of-bounds read.
>
> Fixes: d986f04d6529 ("net/mlx5: add functions for non-template flow sample")
> Cc: stable at dpdk.org
>
> Signed-off-by: Shani Peretz <shperetz at nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
More information about the dev
mailing list