[SRU][J/F][PATCH 1/1] fou: remove warn in gue_gro_receive on unsupported protocol

Bethany Jamison bethany.jamison at canonical.com
Wed Sep 25 17:14:25 UTC 2024


From: Willem de Bruijn <willemb at google.com>

Drop the WARN_ON_ONCE inn gue_gro_receive if the encapsulated type is
not known or does not have a GRO handler.

Such a packet is easily constructed. Syzbot generates them and sets
off this warning.

Remove the warning as it is expected and not actionable.

The warning was previously reduced from WARN_ON to WARN_ON_ONCE in
commit 270136613bf7 ("fou: Do WARN_ON_ONCE in gue_gro_receive for bad
proto callbacks").

Signed-off-by: Willem de Bruijn <willemb at google.com>
Reviewed-by: Eric Dumazet <edumazet at google.com>
Link: https://lore.kernel.org/r/20240614122552.1649044-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
(backported from commit dd89a81d850fa9a65f67b4527c0e420d15bf836c)
[bjamison: use 'goto out_unlock' instead of 'goto out' to adjust for not
including commit fc1ca3348a74a1 (gro: remove rcu_read_lock/rcu_read_unlock 
from gro_receive handlers)]
CVE-2024-44940
Signed-off-by: Bethany Jamison <bethany.jamison at canonical.com>
---
 net/ipv4/fou.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c
index 8fcbc6258ec52..0370affeaacb8 100644
--- a/net/ipv4/fou.c
+++ b/net/ipv4/fou.c
@@ -441,7 +441,7 @@ static struct sk_buff *gue_gro_receive(struct sock *sk,
 	rcu_read_lock();
 	offloads = NAPI_GRO_CB(skb)->is_ipv6 ? inet6_offloads : inet_offloads;
 	ops = rcu_dereference(offloads[proto]);
-	if (WARN_ON_ONCE(!ops || !ops->callbacks.gro_receive))
+	if (!ops || !ops->callbacks.gro_receive)
 		goto out_unlock;
 
 	pp = call_gro_receive(ops->callbacks.gro_receive, head, skb);
-- 
2.34.1




More information about the kernel-team mailing list