Skip to content
KitploitKITPLOIT
OutilsBlog
Soumettre
OutilsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

··Flux·Contact·Confidentialité·© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
Detections-CVE-2026-31431 — Règles de détection, signatures YARA, règles auditd/Wazuh et modèles d'événements MISP pour la vulnérabilité LPE du noyau Linux CVE-2026-31431 (Copy Fail). Inclut des IoC, des étapes d'atténuation et une analyse de l'exploit. | Kitploit
Outils/GitHubGitHub/insomnisec/detections-cve-2026-31431
Gestion des Indicateurs de Compromission (IOC)Escalade de PrivilègesAnalyse des VulnérabilitésExploitationAnalyse ForensiqueRenseignement sur les MenacesDétection d'IntrusionApprentissage et ÉducationRéponse aux Incidents

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
GitHubinsomnisec/detections-cve-2026-31431

Detections-CVE-2026-31431

Règles de détection, signatures YARA, règles auditd/Wazuh et modèles d'événements MISP pour la vulnérabilité LPE du noyau Linux CVE-2026-31431 (Copy Fail). Inclut des IoC, des étapes d'atténuation et une analyse de l'exploit.

Voir le dépôt
25il y a 3 moisPas encore vérifié
Partager

DÉPLACEMENT VERS : https://github.com/insomnisec/public_cve_detections

POUR UNE MEILLEURE GESTION À LONG TERME DES PUBLICATIONS DE DÉTECTION

CE DÉPÔT SERA SUPPRIMÉ EN JUIN 2026

VEUILLEZ UTILISER L'AUTRE DÉPÔT À L'AVENIR

CVE-2026-31431 "Copy Fail" — Package de Détection et Réponse

Publié : 2026-04-30
CVSSv3 : 7.8 (Élevée)
Type : Élévation de Privilèges Locale (LPE)
Sous-système : Noyau Linux algif_aead / template cryptographique Noyaux Linux 4.14 – 6.18.21 (pratiquement toutes les distributions depuis 2017)

authencesn

Affecté :

Références :
  • Analyse de Xint/Theori
  • PoC officiel
  • Divulgation oss-security
  • copy.fail

Table des matières

  1. Résumé de la vulnérabilité
  2. Fonctionnement de l'exploit
  3. Limitations de la détection
  4. Mesures d'atténuation immédiates
  5. Règle YARA
  6. Règles Auditd
  7. Règles Wazuh
  8. Modèle d'événement MISP
  9. Correctifs et remédiation
  10. Références des IoCs clés

Résumé de la vulnérabilité

CVE-2026-31431 est un défaut logique introduit dans le noyau 4.14 (2017) à l'intersection de trois modifications indépendantes :

  1. Le template authencesn (ajouté en 2011 pour le support IPsec ESN) écrit 4 octets de données temporaires au-delà de la limite de son tampon de sortie.
  2. AF_ALG a obtenu le support AEAD en 2015, permettant à l'espace utilisateur de soumettre des données via splice() à partir de fichiers mis en cache en pages.
  3. En 2017, algif_aead.c a été optimisé pour fonctionner en place (req->src == req->dst), plaçant des pages de cache en direct dans un scatterlist inscriptible.

Résultat : un utilisateur non privilégié peut écrire exactement 4 octets contrôlés par l'attaquant dans la copie du cache de pages du noyau de tout fichier lisible — y compris les binaires setuid et /etc/passwd — sans toucher au fichier sur disque. Le PoC fonctionnel est un script Python de 732 octets. Pas de condition de concurrence. Pas de décalages par distribution. Fiable sur Ubuntu, RHEL, Amazon Linux et SUSE.


Fonctionnement de 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:~
Le PoC cible `/etc/passwd` : il trouve l'offset du champ UID de l'utilisateur en cours et le remplace par `0000`, puis invoque `su` pour obtenir un shell root.

---

## Limitations de la détection

> **Lisez cette section avant de déployer les règles ci-dessous.**

Cet exploit présente deux propriétés qui limitent considérablement la couverture de la détection :

**1. L'écriture va dans le cache de pages, pas dans le système de fichiers.**
Tout outil de détection qui surveille les événements du système de fichiers — `inotify`, `fanotify`, AIDE, Tripwire, les surveillances de chemins auditd — **ne** verra **pas** la modification. Le fichier sur disque n'est jamais écrit. Cela signifie que les indicateurs `-p w` (écriture) dans les surveillances de chemins auditd pour `/usr/bin/su` ou `/etc/passwd` ne captureront pas l'écriture réelle de l'exploitation.

**2. Le mécanisme utilise des interfaces noyau légitimes.**
Les sockets `AF_ALG`, `splice()` et `authencesn` ont tous des utilisations légitimes (IPsec, auto-tests du noyau, E/S de type sendfile). La détection doit se concentrer sur la *combinaison* de ces primitives plutôt que sur une seule isolément, et il faut s'attendre à des faux positifs sur les systèmes exécutant IPsec ou effectuant des tests cryptographiques du noyau.

**Ce que la détection PEUT attraper :**
- L'appel système `socket(AF_ALG, SOCK_SEQPACKET, 0)`
- L'appel système `splice()` corrélé avec ce qui précède, en particulier près de l'accès à un binaire setuid
- Le script PoC lui-même (via YARA)
- La chaîne d'algorithme spécifique `authencesn(hmac(sha256),cbc(aes))` dans la mémoire du processus ou les fichiers de script

**Ce que la détection NE PEUT PAS attraper :**
- L'écriture réelle dans le cache de pages (en mémoire, aucun événement du système de fichiers)
- L'utilisation post-exploitation de l'entrée du cache de pages modifiée (ressemble à un appel normal `su` ou `passwd`)
- Les variantes qui évitent Python ou la chaîne d'algorithme spécifique

---

## Atténuation immédiate

Avant de déployer des règles de détection, appliquez cette atténuation sur tout hôte non corrigé :```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

Vérifiez que l'atténuation est active à l'aide du détecteur officiel :```bash

Exit 0 = not vulnerable / mitigated

Exit 2 = VULNERABLE

python3 test_cve_2026_31431.py

root@kitploit:~
> **Note :** La commande `rmmod` échouera si le module n'est pas actuellement chargé ; c'est acceptable. La configuration `modprobe.d` empêche les chargements futurs. Cette atténuation n'a aucun impact sur les charges de travail standard TLS, SSH ou de chiffrement de système de fichiers — elle n'affecte que IPsec avec numéros de séquence étendus utilisant le modèle `authencesn`, ce qui est rare en dehors des passerelles VPN dédiées.

---

## Règle YARA

Enregistrer sous `cve_2026_31431.yar`

> **Périmètre d'analyse :** Cette règle est conçue pour analyser des fichiers de script Python sur disque ou extraits de vidages mémoire. Elle correspondra au PoC connu et à des variantes proches. Elle NE détectera PAS l'activité d'exploitation au niveau des appels système — utilisez les règles auditd/Wazuh pour cela.```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)
}

Règles Auditd

Enregistrer sous /etc/audit/rules.d/cve-2026-31431.rules

Recharger avec :```bash sudo augenrules --load

or on older systems:

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

root@kitploit:~
Source:https://github.com/wecoast/WEC2```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

Interrogation des corrélations

Après avoir déployé les règles, utilisez ausearch pour corréler les correspondances entre les clés dans une fenêtre de temps :```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:~
---

## Règles Wazuh

Enregistrer en tant que fichier de règles locales (généralement `/var/ossec/etc/rules/local_rules.xml`).

> **Prérequis :** Ces règles dépendent de la configuration d'auditd avec les règles ci-dessus et du décodeur Wazuh auditd actif. Elles correspondent au champ `audit.key` renseigné par auditd, ce qui est la manière correcte et fiable de faire le pont entre les deux systèmes. Les règles utilisent `<if_group>auditd</if_group>` plutôt qu'un `<if_sid>` spécifique pour rester compatibles avec les différentes versions de 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>

Modèle d'événement MISP

Enregistrer sous misp_cve_2026_31431.json et importer via MISP → Événements → Importer.

Remarque : Remplacez les UUIDs fictifs ci-dessous par des UUID4 fraîchement générés pour votre environnement avant l'importation. Les valeurs fictives sont affichées dans un format cohérent pour faciliter la lecture.```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": "https://xint.io/blog/copy-fail-linux-distributions" }, { "type": "url", "category": "External analysis", "to_ids": false, "uuid": "7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b", "comment": "Official PoC repository", "value": "https://github.com/theori-io/copy-fail-CVE-2026-31431" } ], "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:~
---

## Correctifs et remédiation

### Correctif du noyau

| Branche | Version corrigée | Commit de correction |
|--------|--------------|------------|
| Stable 6.18.x | 6.18.22 | `fafe0fa2995a0f7073c1c358d7d3145bcc9aedd8` |
| Stable 6.19.x | 6.19.12 | `ce42ee423e58dffa5ec03524054c9d8bfd4f6237` |
| Mainline | 7.0 | `a664bf3d603dc3bdcf9ae47cc21e0daec706d7a5` |

Le correctif annule l'optimisation AEAD sur place de 2017 dans `algif_aead.c` et revient à une opération hors place, garantissant que les pages du cache de pages ne sont jamais placées dans une liste de dispersion accessible en écriture.

### Recommandations par distribution

| Distribution | Action |
|---|---|
| Ubuntu | `apt-get update && apt-get upgrade linux-image-generic` ; vérifiez l'avis USN |
| RHEL / Rocky / Alma | `dnf update kernel` ; vérifiez l'avis RHSB |
| Amazon Linux 2023 | `dnf update kernel` ; vérifiez l'avis ALAS |
| SUSE / openSUSE | `zypper update kernel-default` ; vérifiez l'avis SUSE SA |
| Debian | Consultez le tracker de sécurité ; un correctif rétroporté peut arriver avant la mise à jour du noyau |
| Arch | `pacman -Syu` (rolling ; appliquez le correctif amont dès qu'il est disponible) |

### Vérification d'intégrité après exposition

Si vous soupçonnez qu'une exploitation a eu lieu sur un hôte avant l'application du correctif :```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"

Important : les outils standards d'intégrité des fichiers (AIDE, Tripwire, debsums, rpm -Va) vérifient les hachages sur disque et afficheront le binaire comme non modifié même après une exploitation du cache de pages. Le cache de pages est effacé naturellement par un redémarrage ou drop_caches. Sur un système redémarré, la corruption du cache de pages a disparu, mais l'attaquant a peut-être déjà établi une persistance par d'autres moyens.


Référence des IoCs clés

IndicateurValeurConfiance
Famille de sockets AF_ALG38 (premier argument de socket())Moyen — des utilisations légitimes existent
Type de socket5 (SOCK_SEQPACKET)Moyen
Niveau d'option SOL_ALG279 (premier argument de setsockopt())Moyen
Chaîne d'algorithmeauthencesn(hmac(sha256),cbc(aes))Élevé — inhabituel en dehors de l'ESN IPsec
Chaîne d'appels systèmesocket(38) → setsockopt(279) → splice()Élevé
Charge utile de clé du PoC0800010000000010 (hex, dans setsockopt)Élevé pour un PoC connu
Cible principale du PoCChamp UID de /etc/passwdMoyen
Cibles secondaires/usr/bin/su, /usr/bin/sudoMoyen
Module noyaualgif_aeadSelon le contexte

Pack de détection maintenu d'après le PoC officiel à l'adresse theori-io/copy-fail-CVE-2026-31431. Si vous observez des variantes d'exploitation non couvertes par ces règles, veuillez ouvrir un ticket dans le dépôt principal du PoC.

Télécharger l’outil