Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1384863lqa; Mon, 29 Apr 2024 07:12:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3aC/wjeO3vsBbYHVhhMFBkbCYn34rwm/ot7lURtiL9p8l8CCzJzRAnp7m/lFZ6XRRs1jKKCTioyeA9MF5PLRKwIsV+desRPcf/RXg2g== X-Google-Smtp-Source: AGHT+IEa5BHj443xXP6x/3kBj2li/hiBRueH/2R4XDAbn2q+F5ymI700opY764KxsURZZOcjXkLV X-Received: by 2002:a05:6a00:a07:b0:6ea:c634:ca0f with SMTP id p7-20020a056a000a0700b006eac634ca0fmr11680422pfh.21.1714399925419; Mon, 29 Apr 2024 07:12:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714399925; cv=pass; d=google.com; s=arc-20160816; b=KqPIhY6w3B6ye+hjt7pA9TTSEbRM9c8SAAVwj7vetoAJwy9D4D/gDJG9nZmfO7AuwE Of61MPEMuMT131+Cc9rh2Dv7bYFu34yl5IgMsTx04+nCki/Rj5AzPR7Z9vuFc5JA6RKO RkGGbKR35kPNRLHdomhjnBu7tiQBLCoqGwEr1uk0cZYcL44g52LArvmeUoM/jUhcDxAO Cqj/sYzQNE1emBIvFUb/QsE0fgXjKJkcWjUjqF2e/W5SkbEaPP/rCBUh4muKY86Gfiko u1wvoINLyeSFjH5pA/VWYuCCxqvml+x08VhBjho5ecEUOPU4kAyrVN/lhQOZ+hCoN1Wq ElYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=GIXUMvqjiY4xEa4IXHY49m1tAy/6Wql51uf+jVzBS18=; fh=we6oLvjdvuTIQhg7iwPPV+aaXnnqryo5NWgh1sd1vBQ=; b=tTax1QnPMWV3Kcu7x1XeIRbKSckWXwFxv3PP6A03VCz2/CEzVXLUViL9yuSB3vvm0e aXSHmQHs14QglvdsI3UENAOcjAhbZ8xucsQJWxBieqM+2F4MdZ5WvlJeXNOn4bExP3SW OrUQ0HneZVNHpacWYRcMY3Wdii/YoWpsDoI8N2rvR9rfqAev1k1QO3JB6nFWm4cecvxb Ey5UiddrcWo/Zbf8tXEG6Ni4AJAeuzKKfL6XELKMkU3cDRqTV9v9fXIA7fqblHPzvVhB gDCXQNdshmtYhH1WvmaYxzgZmI0Q3Lqa2eiu4GI96cRs6QT3crizpJmRts+U28uXCh6+ rxkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BOvgJnff; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-162383-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162383-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a16-20020a637050000000b005dc4f8a376asi15655714pgn.884.2024.04.29.07.12.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 07:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162383-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BOvgJnff; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-162383-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162383-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1ABCCB28961 for ; Mon, 29 Apr 2024 13:42:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC23374435; Mon, 29 Apr 2024 13:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BOvgJnff" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F116651B6; Mon, 29 Apr 2024 13:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714398131; cv=none; b=KduauTMErGgXy1lkHtY+MvesUNVJalonbpVQ60oC3XzDS7okeN1tpOH+NuYUq0TObpD1DbdYg8ol61SpcCO7psUO+DR0OxBXkVFSczbAQmk9jLXK1K7zoc3wO8ZohDoqFbV/zb/yqpwYm08v/RyOOyZzOEdXWytVyXvJEJfZNdY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714398131; c=relaxed/simple; bh=zxcI4PxUFpWLulg+udpZ9IhWhzZ7eE3x+oRR48hITQc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IiASY6sFwP00tiqbiJ3F/Q8yqzlU6Ts8kpb4lB9zdpTp9A536LYpWPGHNla+eVAqvcqI5vbCm8DXR0ZO5dahD4DBb7aQ1IuKRtJjFe3F329bOMxeWcYOfk0dFS5V6IeuBpkq10On14OGkEctduO4kzeKnCBLV/28dCnUL57uQjg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BOvgJnff; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3926AC113CD; Mon, 29 Apr 2024 13:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714398130; bh=zxcI4PxUFpWLulg+udpZ9IhWhzZ7eE3x+oRR48hITQc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BOvgJnffQRdc2eLLsTzkjwUsRuizxKjUGmODzgf2wxZdLBeH9W//DPFLoh+xg7/Cu EQ7gm5wh6U/CL3+UsqDkeLp9AxZA36haIBWy+bhVnMRDWnr7030vnxbq9nAzbm5tqv SqbZF6v9WIHSSbmIQ0Q4fL1aQickFVlw2/JT5gyzjJv3nuHkc1Ce/GzRTetn+7Ytjp uGB3o55UR/+4uMQTh1A5EH9GcmGgwW0VtvaeQ7ZWalBJwzjTNp/vzuqWNVDXjAPBXM 2rjzig29Cl/2PLP8UfN0R5Nv/Pat5+7hC+xtIIzyWtJNWKC+5zi9rEtyDKhYwFdNbT EwN2skM936VVA== Date: Mon, 29 Apr 2024 06:42:09 -0700 From: Jakub Kicinski To: Cc: , , , , , , , Lena Wang Subject: Re: [PATCH net] net: prevent pulling SKB_GSO_FRAGLIST skb Message-ID: <20240429064209.5ce59350@kernel.org> In-Reply-To: <20240428142913.18666-1-shiming.cheng@mediatek.com> References: <20240428142913.18666-1-shiming.cheng@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 28 Apr 2024 22:29:13 +0800 shiming.cheng@mediatek.com wrote: > From: Shiming Cheng > > BPF or TC callers may pull in a length longer than skb_headlen() > for a SKB_GSO_FRAGLIST skb. The data in fraglist will be pulled > into the linear space. However it destroys the skb's structure > and may result in an invalid segmentation or kernel exception. > > So we should add protection to stop the operation and return > error to remind callers. One of the fixes you posted breaks the tools/testing/selftests/net/udpgro_fwd.sh selftest. Please investigate, and either adjust the test or the fix.