From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/other Bug 1883] rte_hash with big cap and key size of 64bytes and more can lead to key store corruption
Date: Tue, 17 Feb 2026 20:34:02 +0000 [thread overview]
Message-ID: <bug-1883-3@http.bugs.dpdk.org/> (raw)
http://bugs.dpdk.org/show_bug.cgi?id=1883
Bug ID: 1883
Summary: rte_hash with big cap and key size of 64bytes and more
can lead to key store corruption
Product: DPDK
Version: 26.03
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: other
Assignee: dev@dpdk.org
Reporter: oleksandrn@interfacemasters.com
Target Milestone: ---
Created attachment 340
--> http://bugs.dpdk.org/attachment.cgi?id=340&action=edit
simple repro
I was experimenting with table size of 2^26 and key size of 64 bytes, and
noticed, that deletion was failing for some earlier added entries, after some
digging it seems like the main problem is overflow in key_store offset
calculation, seems like there are multiple places, but as example
new_k = RTE_PTR_ADD(keys, slot_id * h->key_entry_size);
slot_id is u32, and h->key_entry_size is u32 as well, in my case at high
occupancy slot_id can be very high(up to 67mil) which multiplied by 80 will
overflow u32 and will overwrite earlier entries.
lazy fix seem to be making h->key_entry_size u64
Attached simple repro.
--
You are receiving this mail because:
You are the assignee for the bug.
reply other threads:[~2026-02-17 20:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-1883-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox