net: fix skb leak in __skb_tstamp_tx()
In the Linux kernel, the following vulnerability has been resolved: net: fix skb leak in __skb_tstamp_tx() Commit 50749f2dd685 ("tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.") added a call to skb_orphan_frags_rx() to fix leaks with zerocopy skbs. But it ended up adding a leak of its own. When skb_orphan_frags_rx() fails, the function just returns, leaking the skb it just cloned. Free it before returning. This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc.
02 / AFFECTED SOFTWARE
Affected packages
789 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
In the Linux kernel, the following vulnerability has been resolved: net: fix skb leak in __skb_tstamp_tx() Commit 50749f2dd685 ("tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.") added a call to skb_orphan_frags_rx() to fix leaks with zerocopy skbs. But it ended up adding a leak of its own. When skb_orphan_frags_rx() fails, the function just returns, leaking the skb it just cloned. Free it before returning. This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc.
05 / REFERENCES
Further evidence
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
- https://git.kernel.org/stable/c/58766252f6b2c0487cda6976a53d2bb03ae28e2a
- https://git.kernel.org/stable/c/779332447108545ef04682ea29af5f85c0202aee
- https://git.kernel.org/stable/c/82501f1ead557cbee1c2467654ec109a80334d22
- https://git.kernel.org/stable/c/8a02fb71d7192ff1a9a47c9d937624966c6e09af
- https://git.kernel.org/stable/c/a594382ec6d0cc8cff5a8bc7e61b54e3858fb243
- https://git.kernel.org/stable/c/cc18b4685910d5d9de8314bae9c55790701b1811
- https://git.kernel.org/stable/c/e06841a2abf9c82735cee39e88b1d79464088840
- https://git.kernel.org/stable/c/f4d928c00254cfc9dd0ee7076f4a59bceec675f4
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53716.json
- https://nvd.nist.gov/vuln/detail/CVE-2023-53716