* [PATCH] vxlan: keep the last remote linked during FDB flush
@ 2026-07-31 14:13 David Lee
2026-08-02 8:46 ` Sven Eckelmann
0 siblings, 1 reply; 2+ messages in thread
From: David Lee @ 2026-07-31 14:13 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni
Cc: David Lee, Kyle Zeng, Dominik 'Disconnect3d' Czarnota,
netdev, linux-kernel, stable
A non-nexthop FDB entry is expected to have at least one remote while it
remains reachable through the FDB hash table. A filtered bulk flush
violates this invariant when every remote matches: It unlinks the last
remote in vxlan_fdb_dst_destroy() and only afterwards tells vxlan_flush()
to destroy the parent FDB entry.
An RCU reader can find the parent during this interval.
first_remote_rcu() then applies list_entry_rcu() to the empty list head,
producing an invalid remote pointer that the receive learning path can
read from and write to.
When a matching remote is the sole remaining remote, leave it linked and
ask the caller to destroy the entire FDB entry. vxlan_fdb_destroy() keeps
the remote attached while sending the deletion notification and removing
the parent from the lookup structures.
Fixes: c499fccb71cb ("vxlan: vxlan_core: Support FDB flushing by destination VNI")
Cc: stable@vger.kernel.org
Bug found and triaged by OpenAI Security Research and
validated by Trail of Bits.
Assisted-by: Codex:gpt-5.6-sol gpt-5.5-cyber
Signed-off-by: Kyle Zeng <kylebot@openai.com>
---
Trail of Bits has a reproducer for this bug that triggers a
KASAN slab-out-of-bounds read in vxlan_snoop() and can share if needed.
drivers/net/vxlan/vxlan_core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index d834a4865..a00df127d 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -3058,6 +3058,11 @@ vxlan_fdb_flush_match_remotes(struct vxlan_fdb *f, struct vxlan_dev *vxlan,
if (!vxlan_fdb_flush_remote_matches(desc, rd))
continue;
+ if (list_is_singular(&f->remotes)) {
+ *p_destroy_fdb = true;
+ return;
+ }
+
vxlan_fdb_dst_destroy(vxlan, f, rd, true);
remotes_flushed = true;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] vxlan: keep the last remote linked during FDB flush
2026-07-31 14:13 [PATCH] vxlan: keep the last remote linked during FDB flush David Lee
@ 2026-08-02 8:46 ` Sven Eckelmann
0 siblings, 0 replies; 2+ messages in thread
From: Sven Eckelmann @ 2026-08-02 8:46 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, David Lee
Cc: Kyle Zeng, Dominik 'Disconnect3d' Czarnota, netdev,
linux-kernel, stable
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
On Friday, 31 July 2026 16:13:10 CEST David Lee wrote:
> Fixes: c499fccb71cb ("vxlan: vxlan_core: Support FDB flushing by destination VNI")
> Cc: stable@vger.kernel.org
> Bug found and triaged by OpenAI Security Research and
> validated by Trail of Bits.
>
> Assisted-by: Codex:gpt-5.6-sol gpt-5.5-cyber
> Signed-off-by: Kyle Zeng <kylebot@openai.com>
1. weird text (advertisement) + newlines in the tags section which shouldn't be there
https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
(and all these tag/format related sections below)
2. author didn't sign off the patch (see below)
3. odd unrelated Signed-off-by without any obvious connection to
the patch
- I actually would guess that Kyle Zeng <kylebot@openai.com> is the author
and David Lee removed its authorship (From: ) before sending the patch.
But in its current form, David is claiming to be the author. And even
when it is the case, David must still add the the non-Author SoB at the
end.
Regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-02 8:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 14:13 [PATCH] vxlan: keep the last remote linked during FDB flush David Lee
2026-08-02 8:46 ` Sven Eckelmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox