CVE-2026-139169: net: lan966x: release the in-flight slot of a stale TX skb
In the Linux kernel, the following vulnerability has been resolved:
net: lan966x: release the in-flight slot of a stale TX skb
lan966xptptxtstamprequest() counts every two step TX skb waiting for its timestamp in lan966x->ptpskbs, and refuses new ones once LAN966XMAXPTPID are in flight. lan966xptptxtstampoldrelease() frees the skbs that have waited longer than LAN966XPTPTIMEOUT.
Before this patch, oldrelease() does not decrement ptpskbs, so every skb whose timestamp never arrives, for example because the switch discarded the frame, keeps its slot forever. Once LAN966XMAXPTPID slots are lost, two step frames fail to transmit on every port of the switch.
Return the number of released skbs from oldrelease() and subtract it from ptpskbs in txtstamprequest(), under the ptptsidlock it already takes.
This fixes the accounting only. A port's stale skbs are still aged out only when that port sends a two step frame, so a port that stops sending them keeps its stale skbs, and their slots, until it sends one again. That behaviour is unchanged by this patch.
Found by an AI code review agent. Reproduced on a lan9668 board.