# CVE-2026-97995: virtio_console: do not free control-out buffers on remove

- Severity: not scored yet
- 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.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2026-09-25T10:23:26.307Z
- Modified: 2026-10-19T10:17:50.947Z
- Assigned by: Linux

## Description

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

virtio_console: do not free control-out buffers on remove

__send_control_msg() publishes &portdev->cpkt as the control-out
virtqueue cookie. remove_vqs() walks every virtqueue and passes leftover
cookies to free_buf(), which treats them as struct port_buffer and
reads sgpages.

If a control message is still on c_ovq when the device is unbound,
free_buf() reads past the ports_device object.

KASAN reported slab-out-of-bounds in free_buf():

	free_buf
	remove_vqs
	virtcons_remove
	unbind_store

The object was the ports_device allocated in virtcons_probe().

Drain c_ovq without freeing. The packet lives in portdev and is released
with it.

(As written by CVE List.)

## Affected

- Linux Linux: from a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b before b1f39c2a676698cc64c8e105e08b25111a112ec6; from a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b before e03522a990cd2e0f1a736eaa349a9df9ab8541c3; from a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b before 8f6cfc3eca79b8e108d0823756101e2f4f9d811f; from a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b before 2e40c69b9c3448b9c6609cd02013da593b2e123b; from a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b before 177ee901aa2bab02e7f1f8edbb814fd5e386ed62; from a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b before a80c33488e0bbe642ed803b13a4ac8078a70b507; from a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b before f620c40ea6862feed84deb105568b21ec53a7830; from a7a69ec0d8e4a58be7db88d33cbfa2912807bb2b before 894f98e73983f37354214a89a3a7fd35bf9e3072; f92b16b815efe8207090a9b5a767618fd89542ca; d2bbfac82b7942afc5d8e564d7087835280df495; a88e13d9a092fbb772d380944b44eb549ef131fe; dd807a784fd36f4136516d5858efb6473dda422c; and 11 more (not affected: before 4.17; from 5.10.271 up to 5.10.*; from 5.15.222 up to 5.15.*; from 6.1.189 up to 6.1.*; from 6.6.158 up to 6.6.*; from 6.12.111 up to 6.12.*; from 6.18.53 up to 6.18.*; from 7.2.7 up to 7.2.*; from 7.3 up to *)

## References

- <https://git.kernel.org/stable/c/b1f39c2a676698cc64c8e105e08b25111a112ec6>
- <https://git.kernel.org/stable/c/e03522a990cd2e0f1a736eaa349a9df9ab8541c3>
- <https://git.kernel.org/stable/c/8f6cfc3eca79b8e108d0823756101e2f4f9d811f>
- <https://git.kernel.org/stable/c/2e40c69b9c3448b9c6609cd02013da593b2e123b>
- <https://git.kernel.org/stable/c/177ee901aa2bab02e7f1f8edbb814fd5e386ed62>
- <https://git.kernel.org/stable/c/a80c33488e0bbe642ed803b13a4ac8078a70b507>
- <https://git.kernel.org/stable/c/f620c40ea6862feed84deb105568b21ec53a7830>
- <https://git.kernel.org/stable/c/894f98e73983f37354214a89a3a7fd35bf9e3072>

## Sources

- CVE List: [CVE-2026-97995](https://www.cve.org/CVERecord?id=CVE-2026-97995), CVE Terms of Use, modified 2026-10-19
- NVD: [CVE-2026-97995](https://nvd.nist.gov/vuln/detail/CVE-2026-97995), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2026-97995 · Whole record: https://cve.day/CVE-2026-97995.json · Rebuilt by cve.day 2026-11-25T22:59:41.016Z
