From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8903D116F5 for ; Mon, 1 Dec 2025 12:11:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B34764097D; Mon, 1 Dec 2025 12:11:37 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id mn4ZUy8uXrgB; Mon, 1 Dec 2025 12:11:37 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org EAB154096A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1764591097; bh=r7+DYtqqBfukw9TqiWbqW9JxhoADJ7iu+VRT0HCZDyk=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ftBtCsH9hLqknrdiP9qiU5BHh0SwbY966y/38LeAhaE8vUk4VQzGxUTS/JknHF68Z 7NOZeLEd9jDqN8OsuvF7r0St1J2XboM1s+4ryFeXo/94g6CJ7kgQcP62gqqihGXo95 OjnP/aJaSFgNj0HLvw1ZCyfILocylqHcpW5FcHqElAzUZgLHormJ/gGFkoQYoNxMiQ l3BiCUtUbOOC2lYF/aQD5OCFyOlR6WG+zs2cF4YYebo8XHfaCNB/yBZlSt3qPe+mOp wnRw8NKHy8N0ChNMB0vsD9xmvgg+vm7f8vyodUc+1m1L44RhnJs2ylEvVgkCNbKlyL tRXZpG84nR/sw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id EAB154096A; Mon, 1 Dec 2025 12:11:36 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists1.osuosl.org (Postfix) with ESMTP id 5F85B1BD for ; Mon, 1 Dec 2025 12:11:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 419E160F2E for ; Mon, 1 Dec 2025 12:11:35 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id JfQYUHvGWLyo for ; Mon, 1 Dec 2025 12:11:34 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 3E8D660AE8 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3E8D660AE8 Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by smtp3.osuosl.org (Postfix) with ESMTPS id 3E8D660AE8 for ; Mon, 1 Dec 2025 12:11:34 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id B5C506016B; Mon, 1 Dec 2025 12:11:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7F44C4CEF1; Mon, 1 Dec 2025 12:11:29 +0000 (UTC) Date: Mon, 1 Dec 2025 12:11:27 +0000 From: Simon Horman To: Guangshuo Li Cc: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Florian Westphal , Jeff Kirsher , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Tony Nguyen , "Loktionov, Aleksandr" Message-ID: References: <20251201034058.263839-1-lgs201920130244@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251201034058.263839-1-lgs201920130244@gmail.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764591092; bh=r7+DYtqqBfukw9TqiWbqW9JxhoADJ7iu+VRT0HCZDyk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nl4UMKPIHGWUMlmmF44CiagGEXDQPhbCogdwcvYc+lTpPNGC7kGRqGAk2Z02AM7aK iEkm7d9zV6uS8J1dozJlp1B1V6eMt0K93s+l8pcOz1fxCReuKgeglQMD8+g8aKdxlU pCe0a2ky2e4ZNf2yRlzMhTCx+C9Xcv+yHCZ7G1RUPRntv24lLm7JMIOT6/euamrKZB zMLlOYUm+dMZgpX8ChbDYKy243bEks8xSEekcTeXyrw8pEbr/uYAos39ZKygr0Zh5Y /U+QkssbvlctlcTMSjcw2MUthhoUDAJZor2Hk2QEmnz0CYprhE+XXFRELDxQUdMtSv dRGEbxGbUiYkg== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=nl4UMKPI Subject: Re: [Intel-wired-lan] [PATCH v2] e1000: fix OOB in e1000_tbi_should_accept() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" + Aleksandr On Mon, Dec 01, 2025 at 11:40:58AM +0800, Guangshuo Li wrote: > In e1000_tbi_should_accept() we read the last byte of the frame via > 'data[length - 1]' to evaluate the TBI workaround. If the descriptor- > reported length is zero or larger than the actual RX buffer size, this > read goes out of bounds and can hit unrelated slab objects. The issue > is observed from the NAPI receive path (e1000_clean_rx_irq): ... > Fixes: 2037110c96d5 ("e1000: move tbi workaround code into helper function") > Cc: stable@vger.kernel.org > Suggested-by: Tony Nguyen > Signed-off-by: Guangshuo Li > --- > changelog: > v2: > - Keep declarations at the beginning of e1000_tbi_should_accept(). > - Move the last_byte assignment after the length bounds checks (suggested by Tony Nguyen) I'm not sure that Tony's suggestions warrant a Suggested-by tag. And perhaps Aleksandr's Reviewed-by tag should have been carried over from v1: IMHO, I don't think the changes between v1 and v2 materially effect the review. But overall this looks good to me. Reviewed-by: Simon Horman From mboxrd@z Thu Jan 1 00:00:00 1970 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 CAF582F6913; Mon, 1 Dec 2025 12:11:32 +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=1764591092; cv=none; b=KhNq6KMzlTaHGqXDh9FlxR5aCleJ8/XNrCyod5zGsbdvEYLcW7mta36dfuxupjfFhyMSVrKclG1LlqoQIwRjhba2qa3wyk/VibiHpJuQQCrJMxGwtykrJ+cDb0hRwTftSCLHqRIzNi4xibTR6BAvZ2RsOnlvq3TvxJpYlj4bD+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764591092; c=relaxed/simple; bh=r7+DYtqqBfukw9TqiWbqW9JxhoADJ7iu+VRT0HCZDyk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DtIbxJIwIEt11r9MMAeugbG8K9qlmy3GEJeOOabzuPKhgWh7yGSS2/xIKmytzzvxu4LKxCWCw9xUFvaDu3mSsrr1aYz6jl+NGERvlhInF3li+OUFrghCHHsvA++yLK41xW99V5UKmxCuDzFZf47wLWZSQxGK4nz4SJyj564mtHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nl4UMKPI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nl4UMKPI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7F44C4CEF1; Mon, 1 Dec 2025 12:11:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764591092; bh=r7+DYtqqBfukw9TqiWbqW9JxhoADJ7iu+VRT0HCZDyk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nl4UMKPIHGWUMlmmF44CiagGEXDQPhbCogdwcvYc+lTpPNGC7kGRqGAk2Z02AM7aK iEkm7d9zV6uS8J1dozJlp1B1V6eMt0K93s+l8pcOz1fxCReuKgeglQMD8+g8aKdxlU pCe0a2ky2e4ZNf2yRlzMhTCx+C9Xcv+yHCZ7G1RUPRntv24lLm7JMIOT6/euamrKZB zMLlOYUm+dMZgpX8ChbDYKy243bEks8xSEekcTeXyrw8pEbr/uYAos39ZKygr0Zh5Y /U+QkssbvlctlcTMSjcw2MUthhoUDAJZor2Hk2QEmnz0CYprhE+XXFRELDxQUdMtSv dRGEbxGbUiYkg== Date: Mon, 1 Dec 2025 12:11:27 +0000 From: Simon Horman To: Guangshuo Li Cc: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Florian Westphal , Jeff Kirsher , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Tony Nguyen , "Loktionov, Aleksandr" Subject: Re: [PATCH v2] e1000: fix OOB in e1000_tbi_should_accept() Message-ID: References: <20251201034058.263839-1-lgs201920130244@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251201034058.263839-1-lgs201920130244@gmail.com> + Aleksandr On Mon, Dec 01, 2025 at 11:40:58AM +0800, Guangshuo Li wrote: > In e1000_tbi_should_accept() we read the last byte of the frame via > 'data[length - 1]' to evaluate the TBI workaround. If the descriptor- > reported length is zero or larger than the actual RX buffer size, this > read goes out of bounds and can hit unrelated slab objects. The issue > is observed from the NAPI receive path (e1000_clean_rx_irq): ... > Fixes: 2037110c96d5 ("e1000: move tbi workaround code into helper function") > Cc: stable@vger.kernel.org > Suggested-by: Tony Nguyen > Signed-off-by: Guangshuo Li > --- > changelog: > v2: > - Keep declarations at the beginning of e1000_tbi_should_accept(). > - Move the last_byte assignment after the length bounds checks (suggested by Tony Nguyen) I'm not sure that Tony's suggestions warrant a Suggested-by tag. And perhaps Aleksandr's Reviewed-by tag should have been carried over from v1: IMHO, I don't think the changes between v1 and v2 materially effect the review. But overall this looks good to me. Reviewed-by: Simon Horman