1. Archivio CVE
  2. 2026
  3. CVE-2026-46151

CVE-2026-46151

5.5 Gravità media CVSS v3.1 · fonte NVD CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 5.5 – Media

Descrizione

In the Linux kernel, the following vulnerability has been resolved: usb: usblp: fix heap leak in IEEE 1284 device ID via short response usblp_ctrl_msg() collapses the usb_control_msg() return value to 0/-errno, discarding the actual number of bytes transferred. A broken printer can complete the GET_DEVICE_ID control transfer short and the driver has no way to know. usblp_cache_device_id_string() reads the 2-byte big-endian length prefix from the response and trusts it (clamped only to the buffer bounds). The buffer is kmalloc(1024) at probe time. A device that sends exactly two bytes (e.g. 0x03 0xFF, claiming a 1023-byte ID) leaves device_id_string[2..1022] holding stale kmalloc heap. That stale data is then exposed: - via the ieee1284_id sysfs attribute (sprintf("%s", buf+2), truncated at the first NUL in the stale heap), and - via the IOCNR_GET_DEVICE_ID ioctl, which copy_to_user()s the full claimed length regardless of NULs, up to 1021 bytes of uninitialized heap, with the leak size chosen by the device. Fix this up by just zapping the buffer with zeros before each request sent to the device.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
linux linux kernel >= 2.6.12.1 < 5.10.258 –
linux linux kernel >= 5.11 < 5.15.209 –
linux linux kernel >= 5.16 < 6.1.175 –
linux linux kernel >= 6.2 < 6.6.140 –
linux linux kernel >= 6.7 < 6.12.88 –
linux linux kernel >= 6.13 < 6.18.30 –
linux linux kernel >= 6.19 < 7.0.7 –
linux linux kernel 2.6.12 –
linux linux kernel 2.6.12 rc2 –
linux linux kernel 2.6.12 rc3 –
linux linux kernel 2.6.12 rc4 –
linux linux kernel 2.6.12 rc5 –
linux linux kernel 7.1 rc1 –
linux linux kernel 7.1 rc2 –
Tutte le 23.461 vulnerabilità di Linux Kernel

Tipo di vulnerabilità

CWE-401 Memoria non rilasciata dopo l’uso (memory leak)

Il prodotto non tiene traccia della memoria allocata e non la rilascia dopo l’uso, rendendola indisponibile per altri impieghi.

Impatto sui sistemi

AmbitoImpatto
Disponibilità Interruzione del servizio: arresto o riavvio, Interruzione del servizio: instabilità, Interruzione del servizio: esaurimento della CPU, Interruzione del servizio: esaurimento della memoria
Altro Ridurre le prestazioni

Come si previene

Sviluppo · Librerie o framework Choose a language or tool that provides automatic memory management, or makes manual memory management less error-prone. For example, glibc in Linux provides protection against free of invalid pointers. When using Xcode to target OS X or iOS, enable automatic reference counting (ARC). To help correctly and consistently manage memory when programming in C++, consider using a smart pointer class such as std
Architettura e progettazione Use an abstraction library to abstract away risky APIs. Not a complete solution.
Architettura e progettazione · Build e compilazione Consider using the Boehm-Demers-Weiser garbage collector (bdwgc), which can help avoid leaks.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 2.063 CVE di tipo CWE-401, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org