numam-dpdk/app
Vladimir Medvedkin e30ef3a3a0 test/hash: fix buffer overflow with jhash
This patch fixes buffer overflow reported by ASAN,
please reference https://bugs.dpdk.org/show_bug.cgi?id=818

Some tests for the rte_hash table use the rte_jhash_32b() as
the hash function. This hash function interprets the length
argument in units of 4 bytes.

This patch adds a wrapper function around rte_jhash_32b()
to reflect API differences regarding the length argument,
effectively dividing it by 4.

For some tests rte_jhash() is used with keys of length not
a multiple of 4 bytes. From the rte_jhash() documentation:
If input key is not aligned to four byte boundaries or a
multiple of four bytes in length, the memory region just
after may be read (but not used in the computation).

This patch increases the size of the proto field of the
flow_key struct up to uint32_t.

Bugzilla ID: 818
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
2021-10-21 09:42:40 +02:00
..
pdump net: add macro to extract MAC address bytes 2021-09-07 19:08:05 +02:00
proc-info mempool: add namespace to flags 2021-10-20 10:00:16 +02:00
test test/hash: fix buffer overflow with jhash 2021-10-21 09:42:40 +02:00
test-acl app/acl: add script to automate testing 2021-07-30 18:34:35 +02:00
test-bbdev app/bbdev: handle endianness of test data 2021-10-18 20:12:15 +02:00
test-cmdline app/testpmd: build on Windows 2021-07-02 19:03:03 +02:00
test-compress-perf app/testpmd: build on Windows 2021-07-02 19:03:03 +02:00
test-crypto-perf app/crypto-perf: support lookaside IPsec 2021-10-18 20:12:19 +02:00
test-eventdev ethdev: remove jumbo offload flag 2021-10-18 19:20:21 +02:00
test-fib app/testpmd: build on Windows 2021-07-02 19:03:03 +02:00
test-flow-perf ethdev: negotiate delivery of packet metadata from HW to PMD 2021-10-13 00:47:42 +02:00
test-pipeline app/testpmd: build on Windows 2021-07-02 19:03:03 +02:00
test-pmd app/testpmd: add flex item commands 2021-10-20 19:00:26 +02:00
test-regex app/testpmd: build on Windows 2021-07-02 19:03:03 +02:00
test-sad app/testpmd: build on Windows 2021-07-02 19:03:03 +02:00
meson.build app/testpmd: build on Windows 2021-07-02 19:03:03 +02:00