5.5medium
vsock/virtio: fix potential underflow in virtio_transport_get_credit()
- Severity
- 5.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.18% (higher than 7% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: vsock/virtio: fix potential underflow in virtio_transport_get_credit() The credit calculation in virtio_transport_get_credit() uses unsigned arithmetic: ret = vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt); If the peer shrinks its advertised buffer (peer_buf_alloc) while bytes are in flight, the subtraction can underflow and produce a large positive value, potentially allowing more data to be queued than the peer can handle. Reuse virtio_transport_has_space() which already handles this case and add a comment to make it clear why we are doing that. [Stefano: use virtio_transport_has_space() instead of duplicating the code] [Stefano: tweak the commit message]
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 06a8fc78367d070720af960dcecec917d3ae5f3b before d96de882d6b99955604669d962ae14e94b66a551, from 06a8fc78367d070720af960dcecec917d3ae5f3b before 02f9af192b98d15883c70dd41ac76d1b0217c899, from 06a8fc78367d070720af960dcecec917d3ae5f3b before d05bc313788f0684b27f0f5b60c52a844669b542, from 06a8fc78367d070720af960dcecec917d3ae5f3b before ec0f1b3da8061be3173d1c39faaf9504f91942c3, from 06a8fc78367d070720af960dcecec917d3ae5f3b before 3ef3d52a1a9860d094395c7a3e593f3aa26ff012, 4.8 Not affected: before 4.8, from 6.1.162 up to 6.1.*, from 6.6.122 up to 6.6.*, from 6.12.68 up to 6.12.*, from 6.18.8 up to 6.18.*, from 6.19 up to * | CVE List |
| linux linux_kernel | from 4.8 before 6.1.162, from 6.2 before 6.6.122, from 6.7 before 6.12.68, from 6.13 before 6.18.8, 6.19 | NVD |
Classification
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: vsock/virtio: fix potential underflow in virtio_transport_get_credit() The credit calculation in virtio_transport_get_credit() uses unsigned arithmetic: ret = vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt); If the peer shrinks its advertised buffer (peer_buf_alloc) while bytes are in flight, the subtraction can underflow and produce a large positive value, potentially allowing more data to be queued than the peer can handle. Reuse virtio_transport_has_space() which already handles this case and add a comment to make it clear why we are doing that. [Stefano: use virtio_transport_has_space() instead of duplicating the code] [Stefano: tweak the commit message]
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: vsock/virtio: soluciona un posible desbordamiento negativo en virtio_transport_get_credit() El cálculo de crédito en virtio_transport_get_credit() utiliza aritmética sin signo: ret = vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt); Si el par reduce su búfer anunciado (peer_buf_alloc) mientras hay bytes en tránsito, la resta puede sufrir un desbordamiento negativo y producir un valor positivo grande, lo que podría permitir que se pongan en cola más datos de los que el par puede manejar. Reutilizar virtio_transport_has_space() que ya maneja este caso y añadir un comentario para dejar claro por qué lo estamos haciendo. [Stefano: usar virtio_transport_has_space() en lugar de duplicar el código] [Stefano: ajustar el mensaje de commit]
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-23069 changed 2026-10-19 | CVE Terms of Use |
| NVD | CVE-2026-23069 changed 2026-10-19 | Public domain |