Descrizione
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_conntrack_h323: fix OOB read in decode_choice() In decode_choice(), the boundary check before get_len() uses the variable `len`, which is still 0 from its initialization at the top of the function: unsigned int type, ext, len = 0; ... if (ext || (son->attr & OPEN)) { BYTE_ALIGN(bs); if (nf_h323_error_boundary(bs, len, 0)) /* len is 0 here */ return H323_ERROR_BOUND; len = get_len(bs); /* OOB read */ When the bitstream is exactly consumed (bs->cur == bs->end), the check nf_h323_error_boundary(bs, 0, 0) evaluates to (bs->cur + 0 > bs->end), which is false. The subsequent get_len() call then dereferences *bs->cur++, reading 1 byte past the end of the buffer. If that byte has bit 7 set, get_len() reads a second byte as well. This can be triggered remotely by sending a crafted Q.931 SETUP message with a User-User Information Element containing exactly 2 bytes of PER-encoded data ({0x08, 0x00}) to port 1720 through a firewall with the nf_conntrack_h323 helper active. The decoder fully consumes the PER buffer before reaching this code path, resulting in a 1-2 byte heap-buffer-overflow read confirmed by AddressSanitizer. Fix this by checking for 2 bytes (the maximum that get_len() may read) instead of the uninitialized `len`. This matches the pattern used at every other get_len() call site in the same file, where the caller checks for 2 bytes of available data before calling get_len().
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 8.2.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
4.15.1precedenti alla5.10.252→ aggiornare alla5.10.252o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.11precedenti alla5.15.202→ aggiornare alla5.15.202o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.16precedenti alla6.1.165→ aggiornare alla6.1.165o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.2precedenti alla6.6.128→ aggiornare alla6.6.128o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.7precedenti alla6.12.75→ aggiornare alla6.12.75o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.16→ aggiornare alla6.18.16o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla6.19.6→ aggiornare alla6.19.6o successiva. - Linux Linux Kernel: vulnerabile la versione
4.15→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
4.15 rc4→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
4.15 rc5→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
4.15 rc6→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
4.15 rc7→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
4.15 rc8→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
4.15 rc9→ installare l'ultima release supportata dal vendor. - Linux Linux Kernel: vulnerabile la versione
7.0 rc1→ installare l'ultima release supportata dal vendor.
Patch e advisory
- Patch: git.kernel.org/stable/c/2a3aac4205e7d2f1aca2e3827de…
- Patch: git.kernel.org/stable/c/35f1943d242e1b9f0b6e91c0c93…
- Patch: git.kernel.org/stable/c/53d32735d77ab56cc3fc7bd53a7…
- Patch: git.kernel.org/stable/c/7ef82863d42261817a6394c6c88…
- Patch: git.kernel.org/stable/c/81f2fc5b0d0cf4696146f00f837…
- Patch: git.kernel.org/stable/c/baed0d9ba91d4f390da12d50391…
- Patch: git.kernel.org/stable/c/bcb50aa0b8f2b74a9fe5a1c7bee…
- Patch: git.kernel.org/stable/c/f0a83d0a4b7c127d32ac06d607a…
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre la superficie esposta (disattivare servizi e funzionalità inutilizzati), mantenere attive le protezioni del sistema operativo (ASLR, DEP/NX) e segmentare la rete.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| Linux | Linux Kernel | ≥ 4.15.1 < 5.10.252 | 5.10.252 |
| Linux | Linux Kernel | ≥ 5.11 < 5.15.202 | 5.15.202 |
| Linux | Linux Kernel | ≥ 5.16 < 6.1.165 | 6.1.165 |
| Linux | Linux Kernel | ≥ 6.2 < 6.6.128 | 6.6.128 |
| Linux | Linux Kernel | ≥ 6.7 < 6.12.75 | 6.12.75 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.16 | 6.18.16 |
| Linux | Linux Kernel | ≥ 6.19 < 6.19.6 | 6.19.6 |
| Linux | Linux Kernel | 4.15 | — |
| Linux | Linux Kernel | 4.15 rc4 | — |
| Linux | Linux Kernel | 4.15 rc5 | — |
| Linux | Linux Kernel | 4.15 rc6 | — |
| Linux | Linux Kernel | 4.15 rc7 | — |
| Linux | Linux Kernel | 4.15 rc8 | — |
| Linux | Linux Kernel | 4.15 rc9 | — |
| Linux | Linux Kernel | 7.0 rc1 | — |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/2a3aac4205e7d2f1aca2e3827de8cdd517d36c4a
- Patchhttps://git.kernel.org/stable/c/35f1943d242e1b9f0b6e91c0c93bfb293a9f8224
- Patchhttps://git.kernel.org/stable/c/53d32735d77ab56cc3fc7bd53a7d099418f19be1
- Patchhttps://git.kernel.org/stable/c/7ef82863d42261817a6394c6c881bd6757a70f16
- Patchhttps://git.kernel.org/stable/c/81f2fc5b0d0cf4696146f00f837596d10b92dead
- Patchhttps://git.kernel.org/stable/c/baed0d9ba91d4f390da12d5039128ee897253d60
- Patchhttps://git.kernel.org/stable/c/bcb50aa0b8f2b74a9fe5a1c7bee6f2657a288041
- Patchhttps://git.kernel.org/stable/c/f0a83d0a4b7c127d32ac06d607a9214937716129