From patchwork Wed Sep 25 17:14:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bethany Jamison X-Patchwork-Id: 1989492 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XDNfn0g8Xz1xt6 for ; Thu, 26 Sep 2024 03:16:00 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1stVcE-0005jU-To; Wed, 25 Sep 2024 17:15:50 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1stVcB-0005j6-SL for kernel-team@lists.ubuntu.com; Wed, 25 Sep 2024 17:15:47 +0000 Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 90B3A3F231 for ; Wed, 25 Sep 2024 17:15:47 +0000 (UTC) Received: by mail-il1-f197.google.com with SMTP id e9e14a558f8ab-3a0c02a7236so43745ab.3 for ; Wed, 25 Sep 2024 10:15:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727284546; x=1727889346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NjrTBqO42hswVaN44fLbuimn1CX6kD4/DCuY947LunI=; b=bBM9eYk+6ObOUjRpLiN+23kB0C2J+N2YxrLrNrXCtsF1oYDZfATGpcyJ+GsmLLGzT5 A/pmlSAAw3tQgwmeAtIyzjSSbg95hfOMe1mTplH1tjwI8D8/lGEfd88cck1O/p7fsWX2 pZ+WMKme43MPUAR6z9KJF4mCupg/ln9z8mfgGRVlHC0HGACmObwLiDoyLBTwtZ8cTLlE EFBeamO+Yqw0fncf6KGqVN4mfHRBgQGKiukeaLeY4JMRtJjzZm5b+3FMDLsRurCGCbPV f+W+qfJUfN2TZwPXZe2Q90s5AugQtAngNU9/bjoSYpFib8WnoSl3HsJL7br4tKCosViW PWKw== X-Gm-Message-State: AOJu0Yzj5gVq3ROU7vwCruF2t5EdFASuK5j1cLvKBOi9fzbhixeF+tyK ztMe6FO/ZOrZ75oQ2Z1qtHtSSojyhTqdUZzJwztD0y3EYh7DZl+nPZbIElgvLTfyRgQ37ht6XvO WNQOY4b3YVyuPgs8HFNEEakF5+CoEsleqSGArlO0tHK+8z3c7MPeiNoCZ0MUKNdSa0gmYaBgNt+ 0EnY+NPBOHDg== X-Received: by 2002:a92:c269:0:b0:3a0:57b5:6e07 with SMTP id e9e14a558f8ab-3a26d80d6fbmr8930655ab.6.1727284546229; Wed, 25 Sep 2024 10:15:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+Ay2N9/tRm4Fm8/qKsgKCWEoJSvgM1JpMO3ZagM4mY1BQpfb43OhlhHDA4jifDYL0EUAhYw== X-Received: by 2002:a92:c269:0:b0:3a0:57b5:6e07 with SMTP id e9e14a558f8ab-3a26d80d6fbmr8930585ab.6.1727284545789; Wed, 25 Sep 2024 10:15:45 -0700 (PDT) Received: from smtp.gmail.com (167-248-51-36.oa02.lnk04.ne.dynamic.allophone.net. [167.248.51.36]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4d40f416090sm1178341173.176.2024.09.25.10.15.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 10:15:45 -0700 (PDT) From: Bethany Jamison To: kernel-team@lists.ubuntu.com Subject: [SRU][J/F][PATCH 1/1] fou: remove warn in gue_gro_receive on unsupported protocol Date: Wed, 25 Sep 2024 12:14:25 -0500 Message-Id: <20240925171425.96801-3-bethany.jamison@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240925171425.96801-1-bethany.jamison@canonical.com> References: <20240925171425.96801-1-bethany.jamison@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Willem de Bruijn 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 Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240614122552.1649044-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski (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 --- 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);