Descrizione

In the Linux kernel, the following vulnerability has been resolved: netfilter: nft_byteorder: remove multi-register support 64bit byteorder conversion is broken when several registers need to be converted because the source register array advances in steps for 4 bytes instead of 8: for (i = ... src64 = nft_reg_load64(&src[i]); ~~~~~ u32 *src nft_reg_store64(&dst64[i], Remove the multi-register support, it has other issues as well: Pablo points out that commit caf3ef7468f7 ("netfilter: nf_tables: prevent OOB access in nft_byteorder_eval") alters semantics: before the loop operated on registers, i.e. for ( ... ) dst32[i] = htons((u16)src32[i]) .. but after the patch it will operate on bytes, which makes this useless to convert e.g. concatenations, which store each compound in its own register. Multi-convert of u32 has one theoretical application: ct mark . meta mark . tcp dport @intervalset Because ct mark and meta mark are host byte order, use with intervals has to convert the byteorder for ct/meta mark value to network byte order (bigendian). nftables emits this: [ meta load mark => reg 1 ] [ byteorder reg 1 = hton(reg 1, 4, 4) ] [ ct load mark => reg 9 ] [ byteorder reg 9 = hton(reg 9, 4, 4) ] ... I.e. two separate calls. Theoretically it could be changed to do: [ meta load mark => reg 1 ] [ ct load mark => reg 9 ] [ byteorder reg 1 = htonl(reg 1, 4, 8) ] ... But then all it would take to change the set to meta mark . tcp dport . ct mark ... and we'd be back to two "byteorder" calls. IOW, support to convert a range of registers is both dysfunctional and dubious. Simplify this: remove the feature. Pablo Neira Ayuso points out that nftables before 1.1.0 can generate incorrect byteorder conversions, see 9fe58952c45a, "evaluate: skip byteorder conversion for selector smaller than 2 bytes" in nftables.git). Affected rulesets fail to load with this change and old userspace due to 'len != size' check.

Testo originale del record CVE (in inglese).

Come correggere

Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: EPSS 0.2% (percentile 6).

Versioni da aggiornare

  • Linux Linux: vulnerabili le versioni dalla 4.19.307 precedenti alla 4.20 → aggiornare alla 4.20 o successiva.
  • Linux Linux: vulnerabili le versioni dalla 5.4.269 precedenti alla 5.5 → aggiornare alla 5.5 o successiva.
  • Linux Linux: vulnerabili le versioni dalla 5.10.210 precedenti alla 5.11 → aggiornare alla 5.11 o successiva.
  • Linux Linux: vulnerabili le versioni dalla 5.15.140 precedenti alla 5.16 → aggiornare alla 5.16 o successiva.
  • Linux Linux: vulnerabili le versioni dalla 6.1.64 precedenti alla 6.2 → aggiornare alla 6.2 o successiva.
  • Linux Linux: vulnerabili le versioni dalla 6.5.13 precedenti alla 6.6 → aggiornare alla 6.6 o successiva.
  • Linux Linux: vulnerabili le versioni dalla 6.6.3 precedenti alla 6.7 → aggiornare alla 6.7 o successiva.
  • Linux Linux: versione corretta 6.12.115 (o successiva).
  • Linux Linux: versione corretta 6.18.59 (o successiva).
  • Linux Linux: versione corretta 7.1 (o successiva).
  • Linux Linux: vulnerabile la versione 6.7 → installare l'ultima release supportata dal vendor.

Mitigazioni temporanee

Da applicare solo se non è possibile aggiornare subito:

  • Ridurre l'esposizione del componente vulnerabile (segmentazione, accesso solo da reti fidate) finché la patch non è applicata.

Verifica

  1. Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
  2. Confrontare la versione installata con quelle indicate sopra.
  3. Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
  4. Ripetere la scansione per confermare la correzione.

Configurazioni interessate

VendorProdottoVersioni vulnerabiliCorretta in
Linux Linux ≥ 4.19.307 < 4.20 4.20
Linux Linux ≥ 5.4.269 < 5.5 5.5
Linux Linux ≥ 5.10.210 < 5.11 5.11
Linux Linux ≥ 5.15.140 < 5.16 5.16
Linux Linux ≥ 6.1.64 < 6.2 6.2
Linux Linux ≥ 6.5.13 < 6.6 6.6
Linux Linux ≥ 6.6.3 < 6.7 6.7
Linux Linux — 6.12.115
Linux Linux — 6.18.59
Linux Linux — 7.1
Linux Linux 6.7 —

Riferimenti