CVE-2024-36016
tty: n_gsm: fix possible out-of-bounds in gsm0_receive()
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
In the Linux kernel, the following vulnerability has been resolved:
tty: n_gsm: fix possible out-of-bounds in gsm0_receive()
Assuming the following:
- side A configures the n_gsm in basic option mode
- side B sends the header of a basic option mode frame with data length 1
- side A switches to advanced option mode
- side B sends 2 data bytes which exceeds gsm->len
Reason: gsm->len is not used in advanced option mode.
- side A switches to basic option mode
- side B keeps sending until gsm0_receive() writes past gsm->buf
Reason: Neither gsm->state nor gsm->len have been reset after
reconfiguration.
Fix this by changing gsm->count to gsm->len comparison from equal to less
than. Also add upper limit checks against the constant MAX_MRU in
gsm0_receive() and gsm1_receive() to harden against memory corruption of
gsm->len and gsm->mru.
All other checks remain as we still need to limit the data according to the
user configuration and actual payload size.
En el kernel de Linux se ha resuelto la siguiente vulnerabilidad: tty: n_gsm: corrige posibles fuera de los límites en gsm0_receive() Suponiendo lo siguiente: - el lado A configura el n_gsm en modo de opción básica - el lado B envía el encabezado de un mensaje básico trama del modo de opción con longitud de datos 1 - el lado A cambia al modo de opción avanzada - el lado B envía 2 bytes de datos que exceden gsm->len Motivo: gsm->len no se usa en el modo de opción avanzada. - el lado A cambia al modo de opción básica - el lado B continúa enviando hasta que gsm0_receive() escribe más allá de gsm->buf Motivo: Ni gsm->state ni gsm->len se han restablecido después de la reconfiguración. Solucione este problema cambiando gsm->count a gsm->len comparación de igual a menor que. También agregue comprobaciones de límite superior contra la constante MAX_MRU en gsm0_receive() y gsm1_receive() para proteger contra la corrupción de memoria de gsm->len y gsm->mru. Todas las demás comprobaciones permanecen, ya que todavía necesitamos limitar los datos según la configuración del usuario y el tamaño real del payload.
CVSS Scores
SSVC
- Decision:Track
Timeline
- 2024-05-17 CVE Reserved
- 2024-05-29 CVE Published
- 2024-06-17 EPSS Updated
- 2024-11-05 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-125: Out-of-bounds Read
- CWE-787: Out-of-bounds Write
CAPEC
References (12)
URL | Tag | Source |
---|---|---|
https://git.kernel.org/stable/c/e1eaea46bb4020b38a141b84f88565d4603f8dd0 | Vuln. Introduced |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://access.redhat.com/security/cve/CVE-2024-36016 | 2024-09-24 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2283894 | 2024-09-24 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 2.6.35 < 4.19.316 Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.35 < 4.19.316" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 2.6.35 < 5.4.278 Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.35 < 5.4.278" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 2.6.35 < 5.10.219 Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.35 < 5.10.219" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 2.6.35 < 5.15.161 Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.35 < 5.15.161" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 2.6.35 < 6.1.93 Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.35 < 6.1.93" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 2.6.35 < 6.6.33 Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.35 < 6.6.33" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 2.6.35 < 6.8.12 Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.35 < 6.8.12" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 2.6.35 < 6.9.3 Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.35 < 6.9.3" | en |
Affected
| ||||||
Linux Search vendor "Linux" | Linux Kernel Search vendor "Linux" for product "Linux Kernel" | >= 2.6.35 < 6.10 Search vendor "Linux" for product "Linux Kernel" and version " >= 2.6.35 < 6.10" | en |
Affected
|