From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>, Ido Schimmel <idosch@nvidia.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Eric Dumazet <edumazet@google.com>
Subject: [PATCH net 0/5] vxlan: fixes for skb header pulling, cloning, and concurrency in TX path
Date: Thu, 23 Jul 2026 14:42:44 +0000 [thread overview]
Message-ID: <20260723144249.759100-1-edumazet@google.com> (raw)
While working on RTNL-less fill_info for vxlan, Sashiko found annoying
pre-existing issues, adding noise to an already complex work.
This series addresses some of them in VXLAN transmit path,
primarily within route_shortcircuit(), header validation, and neighbour lookup.
Patch 1 fixes a potential use-after-free in vxlan_xmit() caused by caching
the Ethernet header pointer ('eth') before calling route_shortcircuit(), which
can reallocate skb->head via pskb_may_pull().
Patch 2 calls skb_cow_head() in route_shortcircuit() before modifying the
Ethernet header in-place, preventing packet header corruption when the skb
is cloned (e.g., by packet sockets, tcpdump, or dev_queue_xmit).
Patch 3 replaces direct reads of n->ha in route_shortcircuit() with
neigh_ha_snapshot() to safely snapshot the neighbour hardware address under
seqlock protection, avoiding potential torn reads during asynchronous updates.
Patch 4 changes route_shortcircuit() to use pskb_network_may_pull() instead
of pskb_may_pull(). Since skb->data points to the MAC header on transmit
(skb_network_offset(skb) == ETH_HLEN), pskb_may_pull() was only checking 6
bytes into the IP header, leaving the remainder un-pulled in non-linear frags.
Patch 5 applies pskb_network_may_pull() to the remaining transmit-path header
pull checks in arp_reduce(), ND solicitation proxy checks, and MDB entry lookup,
where skb->data similarly points to the Ethernet header.
Eric Dumazet (5):
vxlan: re-fetch eth header after route_shortcircuit()
vxlan: unclone skb head before modifying eth header in
route_shortcircuit()
vxlan: use neigh_ha_snapshot() in route_shortcircuit()
vxlan: use pskb_network_may_pull() in route_shortcircuit()
vxlan: use pskb_network_may_pull() for transmit path header pulls
drivers/net/vxlan/vxlan_core.c | 21 ++++++++++++++-------
drivers/net/vxlan/vxlan_mdb.c | 4 ++--
2 files changed, 16 insertions(+), 9 deletions(-)
--
2.55.0.229.g6434b31f56-goog
next reply other threads:[~2026-07-23 14:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 14:42 Eric Dumazet [this message]
2026-07-23 14:42 ` [PATCH net 1/5] vxlan: re-fetch eth header after route_shortcircuit() Eric Dumazet
2026-07-23 16:37 ` Vadim Fedorenko
2026-07-23 14:42 ` [PATCH net 2/5] vxlan: unclone skb head before modifying eth header in route_shortcircuit() Eric Dumazet
2026-07-23 14:42 ` [PATCH net 3/5] vxlan: use neigh_ha_snapshot() " Eric Dumazet
2026-07-23 16:41 ` Vadim Fedorenko
2026-07-23 14:42 ` [PATCH net 4/5] vxlan: use pskb_network_may_pull() " Eric Dumazet
2026-07-23 16:42 ` Vadim Fedorenko
2026-07-23 14:42 ` [PATCH net 5/5] vxlan: use pskb_network_may_pull() for transmit path header pulls Eric Dumazet
2026-07-23 16:43 ` Vadim Fedorenko
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=20260723144249.759100-1-edumazet@google.com \
--to=edumazet@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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