# CVE-2021-47024: vsock/virtio: free queued packets when closing socket

- 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.25%, higher than 17% of CVEs (2026-12-01)
- Published: 2024-02-28T08:13:36.489Z
- Modified: 2026-06-17T04:16:13.530Z
- 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:

vsock/virtio: free queued packets when closing socket

As reported by syzbot [1], there is a memory leak while closing the
socket. We partially solved this issue with commit ac03046ece2b
("vsock/virtio: free packets during the socket release"), but we
forgot to drain the RX queue when the socket is definitely closed by
the scheduled work.

To avoid future issues, let's use the new virtio_transport_remove_sock()
to drain the RX queue before removing the socket from the af_vsock lists
calling vsock_remove_sock().

[1] https://syzkaller.appspot.com/bug?extid=24452624fc4c571eedd9

(As written by CVE List.)

## Affected

- Linux Linux: from ac03046ece2b158ebd204dfc4896fd9f39f0e6c8 before b605673b523fe33abeafb2136759bcbc9c1e6ebf; from ac03046ece2b158ebd204dfc4896fd9f39f0e6c8 before 27691665145e74a45034a9dccf1150cf1894763a; from ac03046ece2b158ebd204dfc4896fd9f39f0e6c8 before 37c38674ef2f8d7e8629e5d433c37d6c1273d16b; from ac03046ece2b158ebd204dfc4896fd9f39f0e6c8 before 8432b8114957235f42e070a16118a7f750de9d39; 4ea082cd3c400cd5bb36a7beb7e441bf3e29350d; 4e539fa2dec4db3405e47002f2878aa4a99eb68b; 4af8a327aeba102aaa9b78f3451f725bc590b237; 51adb8ebe8c1d80528fc2ea863cfea9d32d2c52b; 7d29c9ad0ed525c1b10e29cfca4fb1eece1e93fb; from 4.9.179 before 4.10; from 4.14.122 before 4.15; from 4.19.46 before 4.20; and 3 more (not affected: before 5.2; from 5.10.37 up to 5.10.*; from 5.11.21 up to 5.11.*; from 5.12.4 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 5.2 before 5.10.37; from 5.11 before 5.11.21; from 5.12 before 5.12.4

## References

- <https://git.kernel.org/stable/c/b605673b523fe33abeafb2136759bcbc9c1e6ebf> (patch)
- <https://git.kernel.org/stable/c/27691665145e74a45034a9dccf1150cf1894763a> (patch)
- <https://git.kernel.org/stable/c/37c38674ef2f8d7e8629e5d433c37d6c1273d16b> (patch)
- <https://git.kernel.org/stable/c/8432b8114957235f42e070a16118a7f750de9d39> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2021-47024 · Whole record: https://cve.day/CVE-2021-47024.json · Rebuilt by cve.day 2026-11-25T22:58:08.620Z
