vxlan: Fix potential null-ptr-deref in vxlan_gro_prepare_receive().
Subsystems (3)
PATCH 1/1 vxlan: Fix potential null-ptr-deref in vxlan_gro_prepare_receive().
From: Kuniyuki Iwashima <[email protected]>
commit 30a45c0bffdd62350261e2f2689fdba426a33578 upstream.
udp_tunnel_sock_release() could set sk->sk_user_data to NULL while vxlan_gro_prepare_receive() is running.
Let's check if rcu_dereference_sk_user_data() is NULL after skb_gro_remcsum_init().
[ Artem Novikov: Apply the check to the older vxlan_gro_receive()
implementation. Initialize the remcsum state first and use the existing out path for cleanup when sk_user_data has been cleared. ]
--- drivers/net/vxlan/vxlan_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/vxlan/vxlan_core.c +5 -1
@@ -790,12 +790,16 @@ static struct sk_buff *vxlan_gro_receive(struct sock *sk,struct vxlanhdr *vh, *vh2;unsigned int hlen, off_vx;int flush =1 ; -struct vxlan_sock *vs =rcu_dereference_sk_user_data (sk); +struct vxlan_sock *vs;__be32 flags;struct gro_remcsum grc;skb_gro_remcsum_init (&grc); + vs =rcu_dereference_sk_user_data (sk); +if (!vs) + goto out; + off_vx =skb_gro_offset (skb); hlen = off_vx +sizeof (*vh); vh =skb_gro_header_fast (skb, off_vx);
[email protected]
AI reviewThis is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
Hi!
This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during development, syzbot report, manual code inspection, LLM or static analysis tool scan.
Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then.
The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
Hi,
Resending in plain text because the mailing lists rejected the HTML version of my previous reply.
This is a stable backport of Kuniyuki Iwashima's upstream commit 30a45c0bffdd62350261e2f2689fdba426a33578.
The original upstream submission does not specify how the issue was discovered. I don't have additional information about the original discovery method.
The backport adapts the NULL check to the older vxlan_gro_receive() implementation in 5.10. The adaptation is described above my Signed-off-by.
Best regards,
Artem Novikov
От: [email protected] <[email protected]>
Отправлено: 1 октября 2026 г. 16:23
Кому: Новиков Артём
Копия: [email protected]; Greg Kroah-Hartman; Sasha Levin; [email protected]; Разов Роман; [email protected]; David S. Miller; Jakub Kicinski; [email protected]; [email protected] Тема: Re: [PATCH 5.10] vxlan: Fix potential null-ptr-deref in vxlan_gro_prepare_receive().
Hi!
This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during development, syzbot report, manual code inspection, LLM or static analysis tool scan.
Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then.
The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.