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=1796290706; b=k99pyBvNlT6LunAR8r+1yH3jZ7caG0R+aAtvCyzU+AE2uQm52IJnjyvVSwprkDa6iOkc aR+oY1FSTTmTZxWCg09pqwrcRlARwFv3qJI2mrROYUuA/SFSLg/4Q6taiZR4ZsopoPgio cQVVKmnkvJrIf06YNV1qZW/pq0oICDeFgs1MPs2RUBz3+fk4lYcfqPgJK7D53W27Tmf7v gzdmiFIovGSKQJR1oaiQIphUGS+ercYVTaThnORabJtaTSe0hYAogq4dN8nfyJs2QjoEo uyWrd7yhdO/N0tKyPMucmJsJNs1JoYSyTyPdVLb6T0mqt7Uwwr8WQC0Nywqv6P1OieQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796290706; 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=6BDl5jp0xG7WsZc1Ge6NZTZZsfPon7abGpk18C18lSI=; b=Zi0zmglQlw0IZ9FuMA2iDwMsEKQnMRk6Gcm6xoMbIHmMSQ3Jm062yYaB392s7h8+14vc 8a+FmiEWkLUrYuPk+GsXG4FCV0kOsBL0rUgFXMyuTzIiezL5BQ6RxYrp1N4ZOZS5QIea/ ncyyGmV+cHAiUgt/Te8SzsA4+lNtzkNGw614vxAOCvMloINOLsZ4R0P+wlimE1K73elsr kVxbk/ia9Ec4zi1iwInYAGJ9U0pOOA5Mh/zSYvmXwOgCx4cX+GlGVngp//k7GdatCrnG3 LKjhZp2IKIgG/ioC0dV7AFRdB++Ukj+yhLH8zbfX3pSrilRWepITFEF1uL/n5D8soiQ== 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=Us3RuBRq; 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 81E36606A32C for ; Thu, 3 Dec 2026 09:38:26 +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=Us3RuBRq Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A7FE1F00896; Thu, 3 Dec 2026 09:38:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796290706; bh=6BDl5jp0xG7WsZc1Ge6NZTZZsfPon7abGpk18C18lSI=; h=From:To:Cc:Subject:Date:Reply-To; b=Us3RuBRqNSX0jG3EPyxJT4E+SV5562Jtm/RSdzcEBQdohONN4GADJeVKKY/kEPyw2 EP6zat0zI6r8jUZUsvP1ZhZhh/yVNcfufNu8MnB6ihzmwS8eK724d5RwGXQID1XFJE s0TdvXRvpguZ+MxvicEkAxZUrS0KkQgi26iaDTT0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-143341: net: stmmac: fix XDP RX buffer DMA sync length Date: Thu, 3 Dec 2026 10:22:57 +0100 Message-ID: <2026120340-CVE-2026-143341-e12d@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=3272; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kW9O07Oc2wyC7E4zP2URvg1U9uI0yLn8zLUDJ6ZEqN4=; b=owGbwMvMwCRo6H6F97bub03G02pJDNmCxluPcibXvDzapf1FuMpi9cP/llPqdRPjjofn5dl8W BGp5GbcEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPh/MQwP/XMk8RngQ833uab stjmVO6uPh/PnQzzVI8nKG/4tSalRXzJjeNPvr6r3CqdAwA= 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: fix XDP RX buffer DMA sync length stmmac_rx() bounded the DMA sync length by the largest data_end seen before and after the XDP program and passed it to page_pool_put_page() on the XDP_CONSUMED path. bpf_xdp_adjust_tail() zeroes the grown area, which dirties the CPU cache, but a later negative adjust only moves data_end back. If the program grows and then shrinks the tail, both endpoints miss the zeroed range, so those dirty cache lines are not written back before the page is reused. The length was also wrong since commit 88095728511e ("net: stmmac: fix rx Scatter-Gather support") moved the page_pool DMA window to offset 0 and set max_len to dma_buf_sz + page_offset: the driver still subtracted buf->page_offset, so it synced [base, data_end - page_offset) instead of [base, data_end). On a non-coherent platform those dirty lines can be evicted after the device has DMA'd the next frame into the recycled page and corrupt it. Sync the whole page_pool DMA window on the XDP_CONSUMED path with page_pool_recycle_direct(), as the PASS path and page_pool allocation already do. The device only writes [page_offset, page_offset + dma_buf_sz), so syncing [base, base + max_len) covers every cache line it can touch, regardless of how the program adjusted the packet. The Linux kernel CVE team has assigned CVE-2026-143341 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit be8b38a722e68ffa069b7dfa887369c33d6ea886 and fixed in 6.18.66 with commit 387f9d83dba3404c010500beb8e9555ad7d812bb Issue introduced in 5.13 with commit be8b38a722e68ffa069b7dfa887369c33d6ea886 and fixed in 7.3.7 with commit 7cc35170975c30596dd52a97db0d3c1db21403e6 Issue introduced in 5.13 with commit be8b38a722e68ffa069b7dfa887369c33d6ea886 and fixed in 7.4-rc2 with commit 363ff816277d4c7064514b160e655bed1dfb3ed8 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-143341 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/387f9d83dba3404c010500beb8e9555ad7d812bb https://git.kernel.org/stable/c/7cc35170975c30596dd52a97db0d3c1db21403e6 https://git.kernel.org/stable/c/363ff816277d4c7064514b160e655bed1dfb3ed8