From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796123147; b=cfHlSHLF1pmoecd2L25VJr49O6tht75gzvwRKQkZ1qA7fI2ZWR8hYiC4C1jNXxsXXDnH 7pSy/HrR66C/T/dtMvB2VLCm+GCBMGb7Ldp8Lkb+FrXcosHc4PYDPcmv+izFC3pTMp/sm F//J9Q6xu1jLFNW6yPcS0RFlwnWUYC71ODdEi88RLktDZ/D5KtU4BUXM3k0z4Xjo/Z21V boMXMmcQo3Tdj/dmp0Zqqp2sXpCq21V5dxxfejjKTVpNX4suOqroUH4g9gV0XZVGyFoWo B1yT/PlTFPtWKZ1Tkb79T83WusEycvv8gZZHpGAuG6hVbC3MUph5qzI8QrFf80vPB8Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796123147; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=7b0jPUt/IBi5yTri314yVljitYgk1npYrptTMsZOYFo=; b=Dotu1mWukia9TPe5CzZCQlbUhyPxW8ilBU5ab8U8tOZm2dpvM9kbnr3Ou1j9tEWsfb67 uFf7Thlt9AQdfo2KeOXZfxM9k80AOFvhY6X0iGaHZb209EgEDZjWqzqSboTdX4Ed54kP4 Ak2y9vPYTP6CYxbnv1yuPb/PFHjiTM1KrtCima5VrgB/EFKo1A3l52KI+nW2I7j38qtnF kDKlBe2M+SDUkp0YyfF9XGmvjnDUWcsdpAfOu2ai9fEnCC8s0lQ+ZbHEq0VYGpvG8ak6E HF01RHM3WMf2dUisfAcnnGqH7G0cMFlpfr67F15Hw9KCPHtVwCzkm0vEDOGICsNJ6sA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bmSqhIQD; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92CDD606A325; Tue, 1 Dec 2026 11:05:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bmSqhIQD Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D8A51F00893; Tue, 1 Dec 2026 11:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796123146; bh=7b0jPUt/IBi5yTri314yVljitYgk1npYrptTMsZOYFo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=bmSqhIQDLhj1Njdv4ds77IwwW21IXnPAkjRlpK5qVS28vQQnKXoSijLKJsEhc5TF8 8iC6gJTJ+obgKc/ErjD9ESi2cNsL8WPJaSQz1l3TFukhsAQaP4jlAXPoH7VshqcGYR OBhAFz4+f6BbvBS6+OTH8Q3rb+H0E5mOz6+MZJDnD7diTqWC59CEL3vCjSJ6x5Yrqb Ox4AX2AvQA3FcBeCEpbJhcn5QBvBjzoBWe0caXNkZ4iseoyydsfOb7qVeYjjepYNp4 5hBl9+L7tp4C/HzanBxJHTFhlcbVgRA7iqCablHGBG74JELYXLkGgpCCR/OT5ku0A2 hzVbZBXnjsJqg== Date: Tue, 1 Dec 2026 11:05:41 +0000 From: Simon Horman To: Florian Fainelli Cc: netdev@vger.kernel.org, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Heiner Kallweit , Russell King , Jijie Shao , Runyu Xiao , David Yang , Herbert Valerio Riedel , Danny Kukawka , Mugunthan V N , Sebastian Hesselbarth , open list , Manuel Lauss Subject: Re: [PATCH net v4 10/10] net: au1000: reject frames larger than the TX bounce buffer Message-ID: <20261201110541.GW804035@horms.kernel.org> References: <20261121004809.1690280-1-f.fainelli@gmail.com> <20261121004809.1690280-11-f.fainelli@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261121004809.1690280-11-f.fainelli@gmail.com> On Fri, Nov 20, 2026 at 04:48:09PM -0800, Florian Fainelli wrote: > au1000_tx() copies skb->len bytes into a MAX_BUF_SIZE coherent buffer > without checking the length. The copy can corrupt neighboring DMA > buffers or run beyond the coherent allocation. > > AF_PACKET with PACKET_VNET_HDR can deliver oversized frames through > both plain sendmsg() and PACKET_TX_RING. In packet_snd(), a nonzero > virtio GSO type bypasses the MTU checks, even when the supplied gso_size > is large enough that virtio_net_hdr_to_skb() leaves the skb non-GSO. > Genuine GSO packets can also reach the driver as oversized frames: > au1000 has no TSO, and software segmentation using a user-supplied > gso_size can produce segments larger than MAX_BUF_SIZE. > > Drop oversized packets before touching the ring or copying any data, > and account them in tx_dropped. Use an IRQ-safe skb free for netpoll. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Florian Fainelli Reviewed-by: Simon Horman