{"id":"CVE-2026-143341","state":"PUBLISHED","title":"net: stmmac: fix XDP RX buffer DMA sync length","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: stmmac: fix XDP RX buffer DMA sync length\n\nstmmac_rx() bounded the DMA sync length by the largest data_end seen\nbefore and after the XDP program and passed it to page_pool_put_page()\non the XDP_CONSUMED path. bpf_xdp_adjust_tail() zeroes the grown area,\nwhich dirties the CPU cache, but a later negative adjust only moves\ndata_end back. If the program grows and then shrinks the tail, both\nendpoints miss the zeroed range, so those dirty cache lines are not\nwritten back before the page is reused.\n\nThe length was also wrong since commit 88095728511e (\"net: stmmac: fix\nrx Scatter-Gather support\") moved the page_pool DMA window to offset 0\nand set max_len to dma_buf_sz + page_offset: the driver still\nsubtracted buf->page_offset, so it synced [base, data_end - page_offset)\ninstead of [base, data_end).\n\nOn a non-coherent platform those dirty lines can be evicted after the\ndevice has DMA'd the next frame into the recycled page and corrupt it.\n\nSync the whole page_pool DMA window on the XDP_CONSUMED path with\npage_pool_recycle_direct(), as the PASS path and page_pool allocation\nalready do. The device only writes [page_offset, page_offset +\ndma_buf_sz), so syncing [base, base + max_len) covers every cache line\nit can touch, regardless of how the program adjusted the packet.","publishedAt":"2026-12-03T09:22:01.991Z","updatedAt":"2026-12-03T09:22:01.991Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"be8b38a722e68ffa069b7dfa887369c33d6ea886","status":"affected","lessThan":"387f9d83dba3404c010500beb8e9555ad7d812bb","versionType":"git"},{"version":"be8b38a722e68ffa069b7dfa887369c33d6ea886","status":"affected","lessThan":"7cc35170975c30596dd52a97db0d3c1db21403e6","versionType":"git"},{"version":"be8b38a722e68ffa069b7dfa887369c33d6ea886","status":"affected","lessThan":"363ff816277d4c7064514b160e655bed1dfb3ed8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/stmicro/stmmac/stmmac_main.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/stmicro/stmmac/stmmac_main.c"]}],"references":["https://git.kernel.org/stable/c/387f9d83dba3404c010500beb8e9555ad7d812bb","https://git.kernel.org/stable/c/7cc35170975c30596dd52a97db0d3c1db21403e6","https://git.kernel.org/stable/c/363ff816277d4c7064514b160e655bed1dfb3ed8"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143341.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143341","state":"PUBLISHED","datePublished":"2026-12-03T09:22:01.991Z","dateUpdated":"2026-12-03T09:22:01.991Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.367Z"},"containers":{"cna":{"title":"net: stmmac: fix XDP RX buffer DMA sync length","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: stmmac: fix XDP RX buffer DMA sync length\n\nstmmac_rx() bounded the DMA sync length by the largest data_end seen\nbefore and after the XDP program and passed it to page_pool_put_page()\non the XDP_CONSUMED path. bpf_xdp_adjust_tail() zeroes the grown area,\nwhich dirties the CPU cache, but a later negative adjust only moves\ndata_end back. If the program grows and then shrinks the tail, both\nendpoints miss the zeroed range, so those dirty cache lines are not\nwritten back before the page is reused.\n\nThe length was also wrong since commit 88095728511e (\"net: stmmac: fix\nrx Scatter-Gather support\") moved the page_pool DMA window to offset 0\nand set max_len to dma_buf_sz + page_offset: the driver still\nsubtracted buf->page_offset, so it synced [base, data_end - page_offset)\ninstead of [base, data_end).\n\nOn a non-coherent platform those dirty lines can be evicted after the\ndevice has DMA'd the next frame into the recycled page and corrupt it.\n\nSync the whole page_pool DMA window on the XDP_CONSUMED path with\npage_pool_recycle_direct(), as the PASS path and page_pool allocation\nalready do. The device only writes [page_offset, page_offset +\ndma_buf_sz), so syncing [base, base + max_len) covers every cache line\nit can touch, regardless of how the program adjusted the packet."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"be8b38a722e68ffa069b7dfa887369c33d6ea886","status":"affected","lessThan":"387f9d83dba3404c010500beb8e9555ad7d812bb","versionType":"git"},{"version":"be8b38a722e68ffa069b7dfa887369c33d6ea886","status":"affected","lessThan":"7cc35170975c30596dd52a97db0d3c1db21403e6","versionType":"git"},{"version":"be8b38a722e68ffa069b7dfa887369c33d6ea886","status":"affected","lessThan":"363ff816277d4c7064514b160e655bed1dfb3ed8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/stmicro/stmmac/stmmac_main.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/stmicro/stmmac/stmmac_main.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/387f9d83dba3404c010500beb8e9555ad7d812bb"},{"url":"https://git.kernel.org/stable/c/7cc35170975c30596dd52a97db0d3c1db21403e6"},{"url":"https://git.kernel.org/stable/c/363ff816277d4c7064514b160e655bed1dfb3ed8"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:22:01.991Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}