{"id":"CVE-2026-143346","summary":"net: stmmac: take ownership of saved RX state at poll entry","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: stmmac: take ownership of saved RX state at poll entry\n\nWhen a saved partial packet completes with a poll budget of one, the\nold loop can leave state_saved and state.skb pointing at an skb that\nhas already been delivered or freed. The next poll then reuses that\npointer, causing a use-after-free or double free.\n\nTake the saved state at poll entry and clear the stored ownership\nimmediately. Save it again only if the packet remains incomplete,\nincluding when the next descriptor is still DMA-owned.\n\nTrack the frame-in-progress flag independently of the status read from\nthe next descriptor. The old code keyed the save on the status of the\nlast descriptor looked at, so a loop stopped at a DMA-owned descriptor\n(rx status not yet valid) could drop the saved error/length bookkeeping\nin stmmac_rx_zc().\n\nDrop the saved state both when the queue parameters are reset and when\nthe ring is destroyed. stmmac_reset_rx_queue() is reached from\n__stmmac_open(), stmmac_xdp_open(), stmmac_resume() and\nstmmac_enable_rx_queue(); without draining it there, a partial frame\nsaved before suspend (or before a queue is disabled and re-enabled)\nsurvives while cur_rx and dirty_rx are rewound to zero. On the resume\npath the ring is only re-armed in place: stmmac_clear_descriptors()\nsets the ownership bits and stmmac_init_dma_engine() restores the tail\npointer, but the RX buffer addresses are not reprogrammed. The first\npoll would then resume the stale skb against a ring position that no\nlonger matches the descriptors it was built from.\n__free_dma_rx_desc_resources() releases it on teardown.\n\nApply the same state handling to stmmac_rx_zc(), which also leaves\nstate_saved set when a saved frame finishes at the budget boundary.\nThat path saves only error and length bookkeeping, not an skb pointer.","modified":"2026-12-03T11:02:06.671222985Z","published":"2026-12-03T09:22:05.163Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143346.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/26219e9402c22181f021034f127a8e278d40545f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e0abe47f4db994354d5b8d54fc20540cdd13258c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f28cacf31e8a344b2f451a48bb1d21be94c435bd"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143346.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143346"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ec222003bd948de8f3ffbca522d328af1a8452ad"},{"fixed":"f28cacf31e8a344b2f451a48bb1d21be94c435bd"},{"fixed":"e0abe47f4db994354d5b8d54fc20540cdd13258c"},{"fixed":"26219e9402c22181f021034f127a8e278d40545f"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143346.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.4.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143346.json"}}],"schema_version":"1.9.2"}