# CVE-2022-49020: net/9p: Fix a potential socket leak in p9_socket_open

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 15% of CVEs (2026-12-02)
- Published: 2024-10-21T20:06:27.976Z
- Modified: 2026-06-17T05:16:51.990Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

net/9p: Fix a potential socket leak in p9_socket_open

Both p9_fd_create_tcp() and p9_fd_create_unix() will call
p9_socket_open(). If the creation of p9_trans_fd fails,
p9_fd_create_tcp() and p9_fd_create_unix() will return an
error directly instead of releasing the cscoket, which will
result in a socket leak.

This patch adds sock_release() to fix the leak issue.

(As written by CVE List.)

## Affected

- Linux Linux: from 6b18662e239a032f908b7f6e164bdf7e2e0a32c9 before 0396227f4daf4792a6a8aaa3b7771dc25c4cd443; from 6b18662e239a032f908b7f6e164bdf7e2e0a32c9 before ded893965b895b2dccd3d1436d8d3daffa23ea64; from 6b18662e239a032f908b7f6e164bdf7e2e0a32c9 before 8b14bd0b500aec1458b51cb621c8e5fab3304260; from 6b18662e239a032f908b7f6e164bdf7e2e0a32c9 before 2d24d91b9f44620824fc37b766f7cae00ca32748; from 6b18662e239a032f908b7f6e164bdf7e2e0a32c9 before e01c1542379fb395e7da53706df598f38905dfbf; from 6b18662e239a032f908b7f6e164bdf7e2e0a32c9 before 8782b32ef867de7981bbe9e86ecb90e92e8780bd; from 6b18662e239a032f908b7f6e164bdf7e2e0a32c9 before aa08323fe18cb7cf95317ffa2d54ca1de8e74ebd; from 6b18662e239a032f908b7f6e164bdf7e2e0a32c9 before dcc14cfd7debe11b825cb077e75d91d2575b4cb8; 2.6.33 (not affected: before 2.6.33; from 4.9.335 up to 4.9.*; from 4.14.301 up to 4.14.*; from 4.19.268 up to 4.19.*; from 5.4.226 up to 5.4.*; from 5.10.158 up to 5.10.*; from 5.15.82 up to 5.15.*; from 6.0.12 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 2.6.33 before 4.9.335; from 4.10 before 4.14.301; from 4.15 before 4.19.268; from 4.20 before 5.4.226; from 5.5 before 5.10.158; from 5.11 before 5.15.82; from 5.16 before 6.0.12; 6.1

## References

- <https://git.kernel.org/stable/c/0396227f4daf4792a6a8aaa3b7771dc25c4cd443> (patch)
- <https://git.kernel.org/stable/c/ded893965b895b2dccd3d1436d8d3daffa23ea64> (patch)
- <https://git.kernel.org/stable/c/8b14bd0b500aec1458b51cb621c8e5fab3304260> (patch)
- <https://git.kernel.org/stable/c/2d24d91b9f44620824fc37b766f7cae00ca32748> (patch)
- <https://git.kernel.org/stable/c/e01c1542379fb395e7da53706df598f38905dfbf> (patch)
- <https://git.kernel.org/stable/c/8782b32ef867de7981bbe9e86ecb90e92e8780bd> (patch)
- <https://git.kernel.org/stable/c/aa08323fe18cb7cf95317ffa2d54ca1de8e74ebd> (patch)
- <https://git.kernel.org/stable/c/dcc14cfd7debe11b825cb077e75d91d2575b4cb8> (patch)

## Sources

- CVE List: [CVE-2022-49020](https://www.cve.org/CVERecord?id=CVE-2022-49020), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-49020](https://nvd.nist.gov/vuln/detail/CVE-2022-49020), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-49020 · Whole record: https://cve.day/CVE-2022-49020.json · Rebuilt by cve.day 2026-11-25T22:58:20.036Z
