[PATCH v3] hash: fix pointer alignment

David Marchand david.marchand at redhat.com
Thu Mar 5 13:18:52 CET 2026


On Fri, 27 Feb 2026 at 15:01, Radu Nicolau <radu.nicolau at intel.com> wrote:
>
> rte_hash_crc assumes input pointer address is 8 byte aligned
> which may not be always the case.
> This fix aligns the input pointer before proceeding to process it
> in 8 byte chunks.
>
> Bugzilla ID: 1892
> Fixes: 504a29af13a7 ("hash: fix strict-aliasing for CRC")

This code has assumed integer alignment since day 0.
This was a 32-bit requirement until commit 614289298daf, and it has
been 64-bit since then.

So I updated the Fixes: reference to:
Fixes: af75078fece3 ("first public release")

> Cc: stable at dpdk.org
>
> Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
> Acked-by: Marat Khalili <marat.khalili at huawei.com>

I am surprised we did not catch the bug with the ipsec_sad_autotest
(as reported in bugzilla) in the GHA UBSan job...
But I can reproduce it locally.

We could probably extend the hash unit test coverage.

In any case, the fix lgtm.
Applied, thanks.


-- 
David Marchand



More information about the dev mailing list