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=1796290722; b=49M9vC4VOmfK7c65p41k9E6HAn86CxewrZG6yW43mGgGrIo3Ua7zCcKKyMTDhcAft9WT LvF+nSlB4Q5BeGgv8Ry/dC4ljJAx3hUgu7mRY3/VfiZP5iV1WhLK8+xXWnZDYbTVJ64ls VUc0y1/4rAdnIeVzXKotaa30RML3PoNhIn5k+atgRYhLu8JBVkxF996pi/ZhdWFNMEZuf HCJ8Z+0sVxQlzqRJSnibm60TDqiPx14nO5JelOPltOxw27iTyFx4HAD2XuTNB/F74ibyB Lp3qEkTBhBk57aW59np3HRhCZB7vUTevhDay/hqRKyhBKQ7/2Ko/XidbxpOtHn/yVMw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796290722; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=y1EaGOg2QkigPRAQup5zy0q8aCyISpndPOPkxDG4pHE=; b=abO26PX7AYDCroxfYCNT+UuEYJr8P7BMdwah0itTjySXtMNjmbZxsJRwPVz5qpoNX9mo sqcjm+oFEkIxH701ah25RrmnEDVaE0b6MhAGxzaHYGCpIYxr1FOwR5N/Mfhfiwras+4ns hVeoNAr1lmQFOFj7YwmZzmufuudFKTMY1IEkCXh7NC+MFsT6jpFXrM2KTlXD4CpGkq1dZ KYHfDFKsvNpPifTeaXeKT9Y+fAMV2bL9nK5BQkMOwwhcJKblSp9ozbitwi2uwCnyXTCDj 93APeht7M3D3SPl1D3nfEVd9ydVXI3+A/paaDSa57fhwOpE/PuHzjVnYLF/3LJ5PTZA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=gt+KSqxd; 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 10A8E606A33B for ; Thu, 3 Dec 2026 09:38:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=gt+KSqxd Received: by smtp.kernel.org (Postfix) with ESMTPSA id 106051F00893; Thu, 3 Dec 2026 09:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796290721; bh=y1EaGOg2QkigPRAQup5zy0q8aCyISpndPOPkxDG4pHE=; h=From:To:Cc:Subject:Date:Reply-To; b=gt+KSqxdjtw9tdAKaOzlCapHJzHFfTZu8RJIwNHUhU3/oTy+FV2AnWhn6GMTsITZs TQgu/ROEqklQJ6TiIbbpOkSFpzVuOmUY52rfOd8rkOP1RR3Rk2HJXn5tBYaNmLI8VF O5nj3S+j8NPCRaSQ7almzAMqZZ+iKGFnbHxNQhvs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-143346: net: stmmac: take ownership of saved RX state at poll entry Date: Thu, 3 Dec 2026 10:23:02 +0100 Message-ID: <2026120341-CVE-2026-143346-e054@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3787; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lY6TQbDdAFqlMFxdqyM2dxdnomCnQdZLD2Kv50Vb8iw=; b=owGbwMvMwCRo6H6F97bub03G02pJDNmCxlv53p533HeNWy35UI1j1I7wDfMsk7PfTeA5aNd86 Ob2M/EnO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi1xYxLOi33HFq4n6bW976 dWLRYuuEfmtJ/mGYH7fs/BwbRYkk/WsT57wpMThyW/ujOQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: net: stmmac: take ownership of saved RX state at poll entry When a saved partial packet completes with a poll budget of one, the old loop can leave state_saved and state.skb pointing at an skb that has already been delivered or freed. The next poll then reuses that pointer, causing a use-after-free or double free. Take the saved state at poll entry and clear the stored ownership immediately. Save it again only if the packet remains incomplete, including when the next descriptor is still DMA-owned. Track the frame-in-progress flag independently of the status read from the next descriptor. The old code keyed the save on the status of the last descriptor looked at, so a loop stopped at a DMA-owned descriptor (rx status not yet valid) could drop the saved error/length bookkeeping in stmmac_rx_zc(). Drop the saved state both when the queue parameters are reset and when the ring is destroyed. stmmac_reset_rx_queue() is reached from __stmmac_open(), stmmac_xdp_open(), stmmac_resume() and stmmac_enable_rx_queue(); without draining it there, a partial frame saved before suspend (or before a queue is disabled and re-enabled) survives while cur_rx and dirty_rx are rewound to zero. On the resume path the ring is only re-armed in place: stmmac_clear_descriptors() sets the ownership bits and stmmac_init_dma_engine() restores the tail pointer, but the RX buffer addresses are not reprogrammed. The first poll would then resume the stale skb against a ring position that no longer matches the descriptors it was built from. __free_dma_rx_desc_resources() releases it on teardown. Apply the same state handling to stmmac_rx_zc(), which also leaves state_saved set when a saved frame finishes at the budget boundary. That path saves only error and length bookkeeping, not an skb pointer. The Linux kernel CVE team has assigned CVE-2026-143346 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4 with commit ec222003bd948de8f3ffbca522d328af1a8452ad and fixed in 6.18.66 with commit f28cacf31e8a344b2f451a48bb1d21be94c435bd Issue introduced in 5.4 with commit ec222003bd948de8f3ffbca522d328af1a8452ad and fixed in 7.3.7 with commit e0abe47f4db994354d5b8d54fc20540cdd13258c Issue introduced in 5.4 with commit ec222003bd948de8f3ffbca522d328af1a8452ad and fixed in 7.4-rc2 with commit 26219e9402c22181f021034f127a8e278d40545f Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-143346 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/f28cacf31e8a344b2f451a48bb1d21be94c435bd https://git.kernel.org/stable/c/e0abe47f4db994354d5b8d54fc20540cdd13258c https://git.kernel.org/stable/c/26219e9402c22181f021034f127a8e278d40545f