Descrizione
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_conntrack_sip: don't use simple_strtoul Replace unsafe port parsing in epaddr_len(), ct_sip_parse_header_uri(), and ct_sip_parse_request() with a new sip_parse_port() helper that validates each digit against the buffer limit, eliminating the use of simple_strtoul() which assumes NUL-terminated strings. The previous code dereferenced pointers without bounds checks after sip_parse_addr() and relied on simple_strtoul() on non-NUL-terminated skb data. A port that reaches the buffer limit without a trailing character is also rejected as malformed. Also get rid of all simple_strtoul() usage in conntrack, prefer a stricter version instead. There are intentional changes: - Bail out if number is > UINT_MAX and indicate a failure, same for too long sequences. While we do accept 05535 as port 5535, we will not accept e.g. 'sip:10.0.0.1:005060'. While its syntactically valid under RFC 3261, we should restrict this to not waste cycles when presented with malformed packets with 64k '0' characters. - Force base 10 in ct_sip_parse_numerical_param(). This is used to fetch 'expire=' and 'rports='; both are expected to use base-10. - In nf_nat_sip.c, only accept the parsed value if its within the 1k-64k range. - epaddr_len now returns 0 if the port is invalid, as it already does for invalid ip addresses. This is intentional. nf_conntrack_sip performs lots of guesswork to find the right parts of the message to parse. Being stricter could break existing setups. Connection tracking helpers are designed to allow traffic to pass, not to block it. Based on an earlier patch from Jenny Guanni Qu <qguanni@gmail.com>.
Come correggere
Priorità: Alta — pianificare la correzione entro pochi giorni. Motivazione: CVSS 9.8.
Versioni da aggiornare
- Linux Linux Kernel: vulnerabili le versioni dalla
2.6.26precedenti alla5.10.258→ aggiornare alla5.10.258o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.11precedenti alla5.15.209→ aggiornare alla5.15.209o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
5.16precedenti alla6.1.175→ aggiornare alla6.1.175o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.2precedenti alla6.6.141→ aggiornare alla6.6.141o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.7precedenti alla6.12.91→ aggiornare alla6.12.91o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.13precedenti alla6.18.33→ aggiornare alla6.18.33o successiva. - Linux Linux Kernel: vulnerabili le versioni dalla
6.19precedenti alla7.0.10→ aggiornare alla7.0.10o successiva. - Linux Linux Kernel: vulnerabile la versione
7.1 rc1→ installare l'ultima release supportata dal vendor.
Patch e advisory
- Patch: git.kernel.org/stable/c/523762e3b6933fff81f01dfa3c6…
- Patch: git.kernel.org/stable/c/7df9863bf538a626e8a684e59cb…
- Patch: git.kernel.org/stable/c/8cd0358379570003659186706e0…
- Patch: git.kernel.org/stable/c/8cf6809cddcbe301aedfc6b51bc…
- Patch: git.kernel.org/stable/c/9c6afcb1c3cbb2c0da65b8515ac…
- Patch: git.kernel.org/stable/c/9f69c323ae0ab517e595c2cc74e…
- Patch: git.kernel.org/stable/c/b3264c977e79d8a25778d4fd115…
- Patch: git.kernel.org/stable/c/ea2ecd29b8f4433e52607192ca9…
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 | ≥ 2.6.26 < 5.10.258 | 5.10.258 |
| Linux | Linux Kernel | ≥ 5.11 < 5.15.209 | 5.15.209 |
| Linux | Linux Kernel | ≥ 5.16 < 6.1.175 | 6.1.175 |
| Linux | Linux Kernel | ≥ 6.2 < 6.6.141 | 6.6.141 |
| Linux | Linux Kernel | ≥ 6.7 < 6.12.91 | 6.12.91 |
| Linux | Linux Kernel | ≥ 6.13 < 6.18.33 | 6.18.33 |
| Linux | Linux Kernel | ≥ 6.19 < 7.0.10 | 7.0.10 |
| Linux | Linux Kernel | 7.1 rc1 | — |
Riferimenti
- Patchhttps://git.kernel.org/stable/c/523762e3b6933fff81f01dfa3c60c0774044cdab
- Patchhttps://git.kernel.org/stable/c/7df9863bf538a626e8a684e59cb2c43eac0ef3c8
- Patchhttps://git.kernel.org/stable/c/8cd0358379570003659186706e077929d6930c40
- Patchhttps://git.kernel.org/stable/c/8cf6809cddcbe301aedfc6b51bcd4944d45795f6
- Patchhttps://git.kernel.org/stable/c/9c6afcb1c3cbb2c0da65b8515ac14d7273872f84
- Patchhttps://git.kernel.org/stable/c/9f69c323ae0ab517e595c2cc74e0ae0d9d085611
- Patchhttps://git.kernel.org/stable/c/b3264c977e79d8a25778d4fd11520f00fea1329c
- Patchhttps://git.kernel.org/stable/c/ea2ecd29b8f4433e52607192ca91084f95787ca0
- Riferimentohttps://cert-portal.siemens.com/productcert/html/ssa-019113.html
- Riferimentohttps://cert-portal.siemens.com/productcert/html/ssa-457936.html