Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
Detections-CVE-2026-31431 — Regole di rilevamento per la vulnerabilità LPE Linux CVE-2026-31431 - Crediti: (Copy Fail) https://copy.fail | Kitploit
Strumenti/GitHubGitHub/insomnisec/detections-cve-2026-31431
Gestione degli Indicatori di Compromissione (IOC)Escalation di PrivilegiAnalisi delle VulnerabilitàExploitInformatica ForenseThreat IntelligenceRilevamento IntrusioniApprendimento e FormazioneRisposta agli Incidenti

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi
GitHubinsomnisec/detections-cve-2026-31431

Detections-CVE-2026-31431

Regole di rilevamento per la vulnerabilità LPE Linux CVE-2026-31431 - Crediti: (Copy Fail) https://copy.fail

Vedi Repository
23 mesi faNon ancora revisionato

TRASFERIMENTO SU: https://github.com/insomnisec/public_cve_detections

PER UNA MIGLIORE GESTIONE A LUNGO TERMINE DELLE PUBBLICAZIONI DI RILEVAMENTO

QUESTO REPO SARÀ RIMOSSO A GIUGNO 2026

PER FAVORE USA L'ALTRO REPO D'ORA IN POI

CVE-2026-31431 "Copy Fail" — Pacchetto di Rilevamento e Risposta

Pubblicato: 2026-04-30
CVSSv3: 7.8 (Alto)
Tipo: Escalation dei privilegi locale (LPE)
Sottosistema: template crittografico algif_aead / authencesn del kernel Linux
Versioni interessate: kernel Linux 4.14 – 6.18.21 (praticamente tutte le distribuzioni dal 2017)
Riferimenti:

  • Analisi di Xint/Theori
  • PoC ufficiale
  • Segnalazione su oss-security
  • copy.fail

Indice

  1. Sommario della vulnerabilità
  2. Come funziona l'exploit
  3. Limitazioni del rilevamento
  4. Mitigazione immediata
  5. Regola YARA
  6. Regole Auditd
  7. Regole Wazuh
  8. Modello evento MISP
  9. Patch e rimedio
  10. Riferimento agli IoC chiave

Sommario della vulnerabilità

CVE-2026-31431 è un difetto logico introdotto nel kernel 4.14 (2017) all'intersezione di tre modifiche indipendenti:

  1. Il template authencesn (aggiunto nel 2011 per il supporto ESN in IPsec) scrive 4 byte di dati scratch oltre il confine del suo buffer di output.
  2. AF_ALG ha ottenuto il supporto AEAD nel 2015, consentendo agli utenti dello spazio utente di inviare dati tramite splice() da file nella page cache.
  3. Nel 2017, algif_aead.c è stato ottimizzato per operare in-place (req->src == req->dst), inserendo pagine vive della page cache in uno scatterlist scrivibile.

Risultato: un utente non privilegiato può scrivere esattamente 4 byte controllati dall'attaccante nella copia nella page cache del kernel di qualsiasi file leggibile — inclusi binari setuid e /etc/passwd — senza toccare il file su disco. Il PoC funzionante è uno script Python di 732 byte. Nessuna race condition. Nessun offset per distribuzione. Affidabile su Ubuntu, RHEL, Amazon Linux e SUSE.


Come funziona l'exploit```

Attacker opens AF_ALG socket (family 38, type 5) └─ Binds to "authencesn(hmac(sha256),cbc(aes))" └─ Sets SOL_ALG (279) options including key and authsize └─ Accepts a connection socket

Attacker opens target file (e.g., /etc/passwd) read-only └─ Uses splice() to feed page-cache pages into the AEAD socket's RX buffer └─ Sends crafted AAD via sendmsg() — bytes 4–7 of AAD = attacker-controlled write value

authencesn performs in-place decryption: └─ scatterwalk_map_and_copy writes seqno_lo into the chained page-cache page └─ recvmsg() returns an error (HMAC fails — expected), but the write already happened

Page-cache now contains attacker-modified copy of the file └─ Kernel executes from page-cache, not disk └─ On-disk file is UNCHANGED — file integrity tools see nothing

root@kitploit:~
Il PoC prende di mira `/etc/passwd`: trova l'offset del campo UID dell'utente in esecuzione e lo sovrascrive con `0000`, quindi invoca `su` per ottenere una shell di root.

---

## Limitazioni del rilevamento

> **Leggi questa sezione prima di implementare qualsiasi regola riportata di seguito.**

Questo exploit ha due proprietà che limitano significativamente la copertura del rilevamento:

**1. La scrittura avviene nella page cache, non nel filesystem.**
Qualsiasi strumento di rilevamento che monitora gli eventi del filesystem — `inotify`, `fanotify`, AIDE, Tripwire, auditd path watches — **non** osserverà la modifica. Il file su disco non viene mai scritto. Ciò significa che i flag `-p w` (write) nei path watch di auditd per `/usr/bin/su` o `/etc/passwd` non rileveranno la scrittura effettiva dello sfruttamento.

**2. Il meccanismo utilizza interfacce kernel legittime.**
I socket `AF_ALG`, `splice()` e `authencesn` hanno tutti usi legittimi (IPsec, self-test del kernel, I/O in stile sendfile). Il rilevamento deve concentrarsi sulla *combinazione* di queste primitive piuttosto che su una sola in isolamento; ci si devono aspettare falsi positivi su sistemi che eseguono IPsec o test crittografici del kernel.

**Cosa il rilevamento PUÒ individuare:**
- La syscall `socket(AF_ALG, SOCK_SEQPACKET, 0)`
- La syscall `splice()` correlata alla precedente, soprattutto in prossimità dell'accesso a binari setuid
- Lo script PoC stesso (tramite YARA)
- La stringa dell'algoritmo specifica `authencesn(hmac(sha256),cbc(aes))` nella memoria di processo o nei file di script

**Cosa il rilevamento NON PUÒ individuare:**
- La scrittura effettiva nella page cache (in memoria, nessun evento del filesystem)
- L'uso post-exploitation della voce modificata nella page cache (sembra una normale chiamata a `su` o `passwd`)
- Varianti che evitano Python o la stringa dell'algoritmo specifica

---

## Mitigazione immediata

Prima di implementare le regole di rilevamento, applica questa mitigazione su qualsiasi host non patchato:```bash
# Disable algif_aead kernel module — blocks the exploit primitive entirely
echo "install algif_aead /bin/false" | sudo tee /etc/modprobe.d/disable-algif-aead.conf
sudo rmmod algif_aead 2>/dev/null || true

Verifica che la mitigazione sia attiva utilizzando il rilevatore ufficiale:```bash

Exit 0 = not vulnerable / mitigated

Exit 2 = VULNERABLE

python3 test_cve_2026_31431.py

root@kitploit:~
> **Nota:** Il comando `rmmod` fallirà se il modulo non è attualmente caricato; questo è accettabile. La configurazione `modprobe.d` previene caricamenti futuri. Questa mitigazione non ha alcun impatto su TLS standard, SSH o carichi di lavoro di crittografia del filesystem — influisce solo su IPsec con Extended Sequence Numbers che utilizzano il template `authencesn`, il quale è insolito al di fuori di gateway VPN dedicati.

---

## Regola YARA

Salva come `cve_2026_31431.yar`

> **Ambito di scansione:** Questa regola è progettata per scansionare file script Python su disco o estratti da dump di memoria. Corrisponderà al PoC noto e a varianti simili. NON rileverà l'attività di sfruttamento a livello di syscall — utilizza le regole auditd/Wazuh per quello.```yara
rule CVE_2026_31431_CopyFail_PoC_HighConfidence {
    meta:
        description     = "High-confidence match: CVE-2026-31431 Copy Fail PoC or close variant"
        author          = "Detection Engineering"
        reference       = "https://xint.io/blog/copy-fail-linux-distributions"
        cve             = "CVE-2026-31431"
        date            = "2026-04-30"
        severity        = "High"
        cvss            = "7.8"

    strings:
        // Algorithm string unique to this exploit path — very high fidelity
        $alg_full      = "authencesn(hmac(sha256),cbc(aes))" ascii

        // Specific socket call signature from PoC: AF_ALG=38, SOCK_SEQPACKET=5
        $socket_call   = "socket(38,5,0)" ascii

        // SOL_ALG socket option (decimal 279)
        $solalg        = "setsockopt(279" ascii

        // Hex key/iv payload written via setsockopt in PoC
        $key_payload   = "0800010000000010" ascii

        // splice() usage in context of AEAD operations
        $splice        = "splice(" ascii

        // Target indicators from PoC (page-cache corruption targets)
        $target_passwd = "/etc/passwd" ascii
        $target_su     = "/usr/bin/su" ascii

        // AF_ALG aead bind strings
        $aead_bind     = "\"aead\"" ascii

    condition:
        // High-confidence: unique algorithm string alone is sufficient
        $alg_full
        or
        // Medium-confidence: socket primitive + option number
        ($socket_call and $solalg)
        or
        // Medium-confidence: splice into AEAD socket targeting a setuid path
        ($aead_bind and $splice and ($target_passwd or $target_su))
        or
        // PoC hex payload present alongside splice
        ($key_payload and $splice)
}

rule CVE_2026_31431_CopyFail_Mechanism {
    meta:
        description     = "Behavioral: AF_ALG AEAD + splice combination suggestive of CVE-2026-31431 technique"
        author          = "Detection Engineering"
        reference       = "https://xint.io/blog/copy-fail-linux-distributions"
        cve             = "CVE-2026-31431"
        date            = "2026-04-30"
        severity        = "Medium"
        note            = "Higher false positive rate than HighConfidence rule — review matches in context"

    strings:
        $authencesn    = "authencesn" ascii nocase
        $af_alg_num    = "socket(38" ascii
        $sol_alg_num   = "279" ascii
        $splice        = "splice(" ascii

    condition:
        ($authencesn and $splice)
        or
        ($af_alg_num and $sol_alg_num and $splice)
}

Regole Auditd

Salva come /etc/audit/rules.d/cve-2026-31431.rules

Ricarica con:```bash sudo augenrules --load

or on older systems:

sudo auditctl -R /etc/audit/rules.d/cve-2026-31431.rules

root@kitploit:~
Il contenuto di questo chunk (11/21) risulta vuoto: dopo "INPUT:" non è presente alcun testo da tradurre. Invia di nuovo il contenuto del chunk per la traduzione.```bash
## ============================================================
## CVE-2026-31431 "Copy Fail" — Auditd Detection Rules
## ============================================================
## These rules capture the MECHANISM of the exploit (socket +
## splice syscalls) and correlated /etc/passwd access patterns.
##
## IMPORTANT: These rules will NOT detect the page-cache write
## itself — it is an in-memory operation with no filesystem
## event. File path watches (-w) on setuid binaries or
## /etc/passwd will not fire on the exploit write.
##
## Correlate rule hits across audit.key values to build signal:
## A hit on afalg_socket followed closely by a hit on
## splice_syscall from the same process is a strong indicator.
## ============================================================

## --- Core exploit primitive: AF_ALG socket creation ---
## Monitors socket(2) syscall where a0 = 0x26 (38 decimal = AF_ALG)
## This is the first step of the exploit chain.
-a always,exit -F arch=b64 -S socket -F a0=0x26 -k cve_2026_31431_afalg_socket
-a always,exit -F arch=b32 -S socket -F a0=0x26 -k cve_2026_31431_afalg_socket

## --- splice() syscall monitoring ---
## splice() is used to feed page-cache pages into the AEAD socket.
## NOTE: splice() is commonly used for sendfile-like operations.
## Correlate with cve_2026_31431_afalg_socket hits from the same PID.
-a always,exit -F arch=b64 -S splice -k cve_2026_31431_splice
-a always,exit -F arch=b32 -S splice -k cve_2026_31431_splice

## --- /etc/passwd access monitoring ---
## The PoC reads /etc/passwd to locate the UID field offset.
## Read access (-p r) is retained here because the intent is
## to correlate this read with the AF_ALG socket key above,
## not to use the watch as a standalone alert.
-w /etc/passwd -p rwa -k cve_2026_31431_passwd_access

## --- setuid binary execution monitoring ---
## Detects execution of su after page-cache modification.
## The page-cache write makes su execute as root; this catches
## the exploitation outcome, not the write itself.
-w /usr/bin/su   -p xa -k cve_2026_31431_su_exec
-w /usr/bin/sudo -p xa -k cve_2026_31431_sudo_exec

## --- algif_aead module state monitoring ---
## The exploit requires algif_aead to be loaded.
## Monitoring modprobe helps detect attempts to load the module
## on systems where it was previously disabled as a mitigation,
## and confirms whether the mitigation is being bypassed.
-a always,exit -F arch=b64 -S finit_module -S init_module -k cve_2026_31431_module_load
-w /etc/modprobe.d -p wa -k cve_2026_31431_modprobe_conf

Interrogazione delle correlazioni

Dopo aver applicato le regole, usa ausearch per correlare le corrispondenze tra le chiavi entro una finestra temporale:```bash

Find all CVE-2026-31431 related events in the last hour

sudo ausearch -k cve_2026_31431_afalg_socket -k cve_2026_31431_splice
--start recent -i | aureport --interpret

Check if a specific PID hit both AF_ALG and splice

sudo ausearch -k cve_2026_31431_afalg_socket --start today -i
| grep 'pid=' | awk -F'pid=' '{print $2}' | awk '{print $1}' | sort -u
| while read pid; do sudo ausearch -k cve_2026_31431_splice --start today -i | grep "pid=$pid"
&& echo "[!] PID $pid hit both AF_ALG and splice — investigate" done

root@kitploit:~
---

## Regole Wazuh

Salvare come file di regole locale (tipicamente `/var/ossec/etc/rules/local_rules.xml`).

> **Prerequisiti:** Queste regole dipendono da auditd configurato con le regole sopra e dal decoder auditd di Wazuh attivo. Corrispondono al campo `audit.key` popolato da auditd, che è il modo corretto e affidabile per collegare i due sistemi. Le regole usano `<if_group>auditd</if_group>` piuttosto che uno specifico `<if_sid>` per rimanere compatibili tra diverse versioni di Wazuh.```xml
<!-- ============================================================
     CVE-2026-31431 "Copy Fail" — Wazuh Correlation Rules
     Requires: auditd rules from cve-2026-31431.rules deployed
     ============================================================ -->

<!-- Level 10: AF_ALG socket creation detected -->
<rule id="112001" level="10">
    <if_group>auditd</if_group>
    <field name="audit.key">cve_2026_31431_afalg_socket</field>
    <description>CVE-2026-31431 Copy Fail: AF_ALG socket (family 38) created by unprivileged process</description>
    <group>cve,privilege_escalation,linux,kernel,crypto,</group>
</rule>

<!-- Level 10: splice() syscall detected -->
<rule id="112002" level="10">
    <if_group>auditd</if_group>
    <field name="audit.key">cve_2026_31431_splice</field>
    <description>CVE-2026-31431 Copy Fail: splice() syscall detected — monitor for correlation with AF_ALG socket rule</description>
    <group>cve,privilege_escalation,linux,kernel,</group>
</rule>

<!-- Level 14 CRITICAL: AF_ALG socket followed by splice() from the same source -->
<!-- This chaining is the core exploit mechanism                                 -->
<rule id="112003" level="14">
    <if_matched_sid>112001</if_matched_sid>
    <if_group>auditd</if_group>
    <field name="audit.key">cve_2026_31431_splice</field>
    <same_field>audit.pid</same_field>
    <description>CVE-2026-31431 Copy Fail CRITICAL: AF_ALG socket creation followed by splice() from same process — active exploitation likely</description>
    <group>cve,privilege_escalation,linux,kernel,crypto,high_confidence,</group>
</rule>

<!-- Level 12: /etc/passwd access correlated with AF_ALG activity -->
<rule id="112004" level="12">
    <if_matched_sid>112001</if_matched_sid>
    <if_group>auditd</if_group>
    <field name="audit.key">cve_2026_31431_passwd_access</field>
    <description>CVE-2026-31431 Copy Fail: /etc/passwd access following AF_ALG socket creation — consistent with PoC target selection</description>
    <group>cve,privilege_escalation,linux,kernel,</group>
</rule>

<!-- Level 13: su or sudo executed after AF_ALG socket was created -->
<!-- This may represent execution of the modified page-cache entry  -->
<rule id="112005" level="13">
    <if_matched_sid>112001</if_matched_sid>
    <if_group>auditd</if_group>
    <field name="audit.key">cve_2026_31431_su_exec|cve_2026_31431_sudo_exec</field>
    <description>CVE-2026-31431 Copy Fail: su/sudo execution following AF_ALG socket creation — possible post-exploitation</description>
    <group>cve,privilege_escalation,linux,kernel,</group>
</rule>

<!-- Level 12: Attempt to load algif_aead after it was disabled as a mitigation -->
<rule id="112006" level="12">
    <if_group>auditd</if_group>
    <field name="audit.key">cve_2026_31431_module_load</field>
    <field name="audit.exe" type="pcre2">^.*(python|python3|insmod|modprobe).*$</field>
    <description>CVE-2026-31431 Copy Fail: Kernel module load attempt — verify algif_aead mitigation has not been bypassed</description>
    <group>cve,privilege_escalation,linux,kernel,</group>
</rule>

<!-- Level 13: modprobe.d config modified — possible mitigation removal -->
<rule id="112007" level="13">
    <if_group>auditd</if_group>
    <field name="audit.key">cve_2026_31431_modprobe_conf</field>
    <description>CVE-2026-31431 Copy Fail: /etc/modprobe.d modified — verify algif_aead disable config has not been removed</description>
    <group>cve,privilege_escalation,linux,kernel,</group>
</rule>

Modello Evento MISP

Salva come misp_cve_2026_31431.json e importa tramite MISP → Events → Import.

Nota: Sostituisci gli UUID segnaposto qui sotto con UUID4 appena generati per il tuo ambiente prima dell'importazione. I valori segnaposto sono mostrati in un formato coerente per facilitarne la lettura.```json { "Event": { "uuid": "7f3a2d1e-8b4c-4f9a-a3e2-6d5c1b8e9f0a", "info": "CVE-2026-31431 Copy Fail — Linux LPE via authencesn page-cache write", "threat_level_id": "2", "analysis": "2", "date": "2026-04-30", "Attribute": [ { "type": "vulnerability", "category": "External analysis", "to_ids": false, "uuid": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "comment": "CVE identifier", "value": "CVE-2026-31431" }, { "type": "text", "category": "Other", "to_ids": false, "uuid": "2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e", "comment": "Vulnerability description", "value": "Logic flaw in Linux kernel authencesn cryptographic template. An unprivileged local user can write 4 attacker-controlled bytes into the page cache of any readable file via AF_ALG + splice(), enabling local privilege escalation. No race condition required. Affects kernels 4.14 through 6.18.21." }, { "type": "text", "category": "Other", "to_ids": false, "uuid": "3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f", "comment": "Attack vector summary", "value": "socket(38, 5, 0) [AF_ALG/SOCK_SEQPACKET] → bind authencesn(hmac(sha256),cbc(aes)) → setsockopt(SOL_ALG/279) → splice() page-cache pages into AEAD socket → 4-byte controlled write into page cache of target file" }, { "type": "text", "category": "Other", "to_ids": false, "uuid": "4d5e6f7a-8b9c-0d1e-2f3a-4b5c6d7e8f9a", "comment": "Affected kernel range", "value": "Linux kernel 4.14 (commit 72548b093ee3) through 6.18.21" }, { "type": "text", "category": "Other", "to_ids": false, "uuid": "5e6f7a8b-9c0d-1e2f-3a4b-5c6d7e8f9a0b", "comment": "Introducing commit (root cause)", "value": "72548b093ee38a6d4f2a19e6ef1948ae05c181f7 — algif_aead in-place AEAD optimization (2017)" }, { "type": "text", "category": "Other", "to_ids": false, "uuid": "6f7a8b9c-0d1e-2f3a-4b5c-6d7e8f9a0b1c", "comment": "Fix commit — kernel 6.18.22 stable", "value": "fafe0fa2995a0f7073c1c358d7d3145bcc9aedd8" }, { "type": "text", "category": "Other", "to_ids": false, "uuid": "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d", "comment": "Fix commit — kernel 6.19.12 stable", "value": "ce42ee423e58dffa5ec03524054c9d8bfd4f6237" }, { "type": "text", "category": "Other", "to_ids": false, "uuid": "8b9c0d1e-2f3a-4b5c-6d7e-8f9a0b1c2d3e", "comment": "Fix commit — kernel 7.0 mainline", "value": "a664bf3d603dc3bdcf9ae47cc21e0daec706d7a5" }, { "type": "text", "category": "Other", "to_ids": true, "uuid": "9c0d1e2f-3a4b-5c6d-7e8f-9a0b1c2d3e4f", "comment": "IoC: Socket family (AF_ALG)", "value": "socket family 38 (AF_ALG)" }, { "type": "text", "category": "Other", "to_ids": true, "uuid": "0d1e2f3a-4b5c-6d7e-8f9a-0b1c2d3e4f5a", "comment": "IoC: Socket type (SOCK_SEQPACKET)", "value": "socket type 5 (SOCK_SEQPACKET)" }, { "type": "text", "category": "Other", "to_ids": true, "uuid": "1e2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b", "comment": "IoC: Socket option (SOL_ALG = 279)", "value": "setsockopt level 279 (SOL_ALG)" }, { "type": "text", "category": "Other", "to_ids": true, "uuid": "2f3a4b5c-6d7e-8f9a-0b1c-2d3e4f5a6b7c", "comment": "IoC: Algorithm string (highest fidelity)", "value": "authencesn(hmac(sha256),cbc(aes))" }, { "type": "text", "category": "Other", "to_ids": true, "uuid": "3a4b5c6d-7e8f-9a0b-1c2d-3e4f5a6b7c8d", "comment": "IoC: Primary PoC target file", "value": "/etc/passwd (UID field offset targeted by PoC)" }, { "type": "text", "category": "Other", "to_ids": true, "uuid": "4b5c6d7e-8f9a-0b1c-2d3e-4f5a6b7c8d9e", "comment": "IoC: Secondary targets (setuid binaries)", "value": "/usr/bin/su, /usr/bin/sudo" }, { "type": "text", "category": "Other", "to_ids": false, "uuid": "5c6d7e8f-9a0b-1c2d-3e4f-5a6b7c8d9e0f", "comment": "Immediate mitigation", "value": "echo 'install algif_aead /bin/false' > /etc/modprobe.d/disable-algif-aead.conf && rmmod algif_aead" }, { "type": "url", "category": "External analysis", "to_ids": false, "uuid": "6d7e8f9a-0b1c-2d3e-4f5a-6b7c8d9e0f1a", "comment": "Official write-up", "value": "" }, { "type": "url", "category": "External analysis", "to_ids": false, "uuid": "7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b", "comment": "Official PoC repository", "value": "" } ], "Object": [ { "name": "vulnerability", "meta-category": "vulnerability", "Attribute": [ { "type": "vulnerability", "object_relation": "id", "value": "CVE-2026-31431" }, { "type": "cvss-score", "object_relation": "cvss-score", "value": "7.8" }, { "type": "text", "object_relation": "summary", "value": "Linux kernel authencesn LPE via AF_ALG + splice() page-cache write" } ] } ] } }

root@kitploit:~
---

## Patching e Rimedio

### Patch del kernel

| Ramo | Versione corretta | Commit della fix |
|--------|--------------|------------|
| Stable 6.18.x | 6.18.22 | `fafe0fa2995a0f7073c1c358d7d3145bcc9aedd8` |
| Stable 6.19.x | 6.19.12 | `ce42ee423e58dffa5ec03524054c9d8bfd4f6237` |
| Mainline | 7.0 | `a664bf3d603dc3bdcf9ae47cc21e0daec706d7a5` |

La fix ripristina l'ottimizzazione AEAD in-place del 2017 in `algif_aead.c`, tornando al funzionamento out-of-place, garantendo che le pagine della page cache non vengano mai inserite in uno scatterlist scrivibile.

### Indicazioni specifiche per distribuzione

| Distribuzione | Azione |
|---|---|
| Ubuntu | `apt-get update && apt-get upgrade linux-image-generic`; controllare l'avviso USN |
| RHEL / Rocky / Alma | `dnf update kernel`; controllare l'avviso RHSB |
| Amazon Linux 2023 | `dnf update kernel`; controllare l'avviso ALAS |
| SUSE / openSUSE | `zypper update kernel-default`; controllare l'avviso SUSE SA |
| Debian | Controllare il security tracker; la patch backportata potrebbe arrivare prima dell'aggiornamento del kernel |
| Arch | `pacman -Syu` (rolling; recepire la fix upstream quando arriva) |

### Verifica dell'integrità dopo l'esposizione

Se sospetti che lo sfruttamento sia avvenuto su un host prima della patch:```bash
# 1. Check if /etc/passwd UID fields have been tampered
# (compare against a known-good backup or secondary host)
awk -F: '$3 ~ /^0+$/ && $1 != "root" {print "SUSPICIOUS UID 0 ENTRY:", $0}' /etc/passwd

# 2. Drop the page cache to flush any in-memory modifications
# WARNING: This impacts performance temporarily
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches

# 3. Verify setuid binaries against package manager
rpm -Va --nomtime 2>/dev/null | grep -E '^.{0,8}5.*su$|^.{0,8}5.*sudo$'   # RHEL/rpm
debsums -s 2>/dev/null | grep -E 'su|sudo'                                  # Debian/Ubuntu

# 4. Re-examine recently logged su/sudo invocations for unexpected UID transitions
journalctl -u sudo --since "48 hours ago" | grep "session opened for user root"

Importante: Gli strumenti standard di verifica dell'integrità dei file (AIDE, Tripwire, debsums, rpm -Va) controllano gli hash su disco e mostreranno il binario come non modificato anche dopo lo sfruttamento della page-cache. La page cache viene cancellata naturalmente riavviando o con drop_caches. Su un sistema riavviato, la corruzione della page-cache è sparita, ma l'attaccante potrebbe aver già stabilito una persistenza tramite altri mezzi.


Riferimento degli IoC chiave


Il pacchetto di rilevamento è mantenuto contro il PoC ufficiale presso theori-io/copy-fail-CVE-2026-31431. Se osservi varianti di sfruttamento non coperte da queste regole, apri una issue nel repository del PoC principale.

Scarica lo strumento
https://xint.io/blog/copy-fail-linux-distributions
https://github.com/theori-io/copy-fail-CVE-2026-31431
IndicatoreValoreAttendibilità
Famiglia di socket AF_ALG38 (primo argomento di socket())Media — esistono usi legittimi
Tipo di socket5 (SOCK_SEQPACKET)Media
Livello dell'opzione SOL_ALG279 (primo argomento di setsockopt())Media
Stringa dell'algoritmoauthesn(hmac(sha256),cbc(aes))Alta — insolita al di fuori di IPsec ESN
Catena di syscallsocket(38) → setsockopt(279) → splice()Alta
Payload chiave del PoC0800010000000010 (hex, in setsockopt)Alta per il PoC noto
Obiettivo primario del PoC/etc/passwd campo UIDMedia
Obiettivi secondari/usr/bin/su, /usr/bin/sudoMedia
Modulo del kernelalgif_aeadDipende dal contesto