Skip to content

Kernel LPE vulnerabilities (Copy Fail, DirtyFrag and Fragnesia) - AKS remediation guidance #5753

Open

Description

@djsly

Kernel LPE vulnerabilities (Copy Fail, DirtyFrag and Fragnesia) - AKS remediation guidance

Update: September 9, 2026

Fixed AKS node images are available for the Ubuntu and Azure Linux kernel families listed below. Upgrade existing node pools to a current supported image at or above the applicable minimum; publication of an image does not update existing nodes. This update supersedes earlier statements in this issue that Ubuntu fixes were still pending.

Advisory status: open pending release of the Ubuntu 20.04 FIPS module-mitigation cleanup (Azure/AgentBaker#9431). Its fixed kernel is already available; the remaining work removes obsolete module restrictions, not a missing kernel security patch. The cleanup release vehicle will be added here before closing this advisory.

Vulnerability CVE Affected module
Copy Fail CVE-2026-31431 algif_aead
DirtyFrag CVE-2026-43284, CVE-2026-43500 esp4, esp6, rxrpc
Fragnesia CVE-2026-46300 esp4, esp6

These Linux kernel flaws can allow a local attacker, including an attacker with execution in a container under affected configurations, to escalate privileges. Windows nodes are outside the scope of these Linux kernel vulnerabilities.

Minimum fixed node images

The minimum applies within the same OS and kernel family, not across different image SKUs. Use the newest supported image available in your region rather than pinning to these historical minimums.

AKS image / kernel family Minimum fixed VHD Kernel package in that VHD
Ubuntu 22.04, standard Azure kernel; Gen1, Gen2, Trusted Launch and ARM64 202606.08.1 5.15.0-1114.123
Ubuntu 22.04 FIPS; Gen1, Gen2 and FIPS Trusted Launch 202606.08.1 5.15.0-1114.123+fips1
Ubuntu 24.04, standard Azure kernel; Gen1, Gen2, Trusted Launch and ARM64 when booted with the standard -azure kernel 202606.08.1 6.8.0-1059.65
Ubuntu 20.04 FIPS; Gen1 and Gen2 202606.08.1 5.4.0-1164.170+fips1
Ubuntu 24.04 confidential VM, Azure FDE kernel 202606.08.1 6.8.0-1058.65
Azure Linux 3.0, standard host kernel; Gen1, Gen2, ARM64, FIPS, Trusted Launch and CVM variants 202605.27.0 6.6.139.1-1.azl3

Ubuntu 20.04's 5.4 kernel is not affected by Fragnesia; the listed FIPS image contains the fixes needed for the other CVEs. Its inclusion documents the historical remediation floor and does not extend OS support.

Sources: Ubuntu 22.04 image packages, 24.04 image packages, 22.04 FIPS packages, 20.04 FIPS packages, 24.04 CVM packages, and Azure Linux 3.0 image packages.

The Ubuntu images were published in the AKS June 19 release. The standard/FIPS kernel fixes are recorded on Canonical's CVE pages linked above. For Ubuntu 24.04 FDE, the matching Canonical package changelog records Copy Fail and both DirtyFrag/Fragnesia fixes; this is separate evidence from the standard Azure kernel's version number. Azure Linux 3.0 remediation and module-policy changes are tracked in Azure/AgentBaker#8546.

Module mitigation removal: a separate release milestone

Configuration Status of AgentBaker's temporary module restrictions
Ubuntu 22.04 / 24.04, covered kernel families Kernel-aware cleanup already shipped in AgentBaker v0.20260729.1, targeting VHD 202607.29.0. The VHD patch suffix is .0, not .1.
Ubuntu 20.04 FIPS Kernel-fixed since 202606.08.1, but released scripts still retain the restrictions. Cleanup is proposed in Azure/AgentBaker#9431 for running 5.4.0-*-azure-fips kernels at ABI 1164 or newer; the PR is not yet merged and no released cleanup VHD is claimed.
Azure Linux 3.0, standard host kernel The four-module restriction was omitted from new builds starting with 202605.27.0. Existing restrictions are not actively removed by the Azure Linux runtime CSE path.

Ubuntu cleanup is implemented by Azure/AgentBaker#8997 and Azure/AgentBaker#9054, both included in the published AgentBaker release. VHD 202607.29.0 is listed in the AKS August 7 release.

For the verified Ubuntu 22.04 Azure/FIPS family, released cleanup uses running-kernel ABI 1116 or newer, more conservative than the vendor's first fixed ABI 1114. For the verified Ubuntu 24.04 standard Azure/FDE family it uses ABI 1058 or newer. The July image meets these cutoffs. June's fixed-kernel floor must not be presented as the first image with mitigation removed.

Cleanup is run during provisioning, including the real-node phase used after PIS preprovisioning; it is not a background update to existing nodes. Scriptless provisioning uses the scripts baked into the image. Older script-based CSE can reapply restrictions even with a newer image, so consuming the corresponding provisioning implementation matters as well as the kernel and image.

Important exclusions

Do not remove mitigation merely because an image version is newer than the table. The following are not covered by its fixed-kernel assurance:

  • Ubuntu ARM64 using an Azure NVIDIA kernel. Images can contain both standard Azure and NVIDIA kernels. In particular, 6.14.0-1007-azure-nvidia is not covered by the standard Ubuntu 24.04 fix. Check the kernel actually running.
  • Ubuntu 20.04 confidential VM / other unlisted FDE kernel families. Do not reuse the standard/FIPS or Ubuntu 24.04 FDE thresholds for another kernel family.
  • Azure Linux OSGuard (kernel-ipe). Retain its existing module restrictions; the standard Azure Linux kernel threshold does not apply to it.
  • Kata guest kernels (kernel-uvm / kernel-mshv). The Azure Linux row covers the node host kernel, including hosts running Kata, not the separate guest kernel. Do not infer a guest-kernel fix from the host image version.
  • Azure Linux 2.0 / Mariner and other unlisted or unsupported streams. No fixed-image minimum is asserted here. Keep applicable protection in place and migrate unsupported pools to a supported OS.

For an excluded configuration that requires the affected modules, contact Azure Support for configuration-specific guidance rather than bypassing the restrictions.

Update existing node pools

Check the pool's current image and the newest image offered in its region:

az aks nodepool show \
  --resource-group <resource-group> \
  --cluster-name <cluster-name> \
  --name <node-pool-name> \
  --query nodeImageVersion -o tsv

az aks nodepool get-upgrades \
  --resource-group <resource-group> \
  --cluster-name <cluster-name> \
  --nodepool-name <node-pool-name> \
  --query latestNodeImageVersion -o tsv

Perform a node-image-only upgrade for each affected pool, using your normal maintenance, surge and disruption-budget process:

az aks nodepool upgrade \
  --resource-group <resource-group> \
  --cluster-name <cluster-name> \
  --name <node-pool-name> \
  --node-image-only

After the rollout, inspect every node, not just pool metadata:

kubectl get nodes -o custom-columns='NAME:.metadata.name,IMAGE:.metadata.labels.kubernetes\.azure\.com/node-image-version,KERNEL:.status.nodeInfo.kernelVersion'

Confirm the image meets its applicable minimum and the running kernel belongs to the covered family. Installing a package without booting the fixed kernel is insufficient. See AKS node-image upgrades and the AKS release tracker for upgrade and regional availability guidance.

Retiring temporary module mitigation

Kernel remediation and removal of historical module restrictions are separate. A patched kernel can remain protected from exploitation even while a legacy blacklist still blocks legitimate module use.

Only retire the advisory's temporary mitigation after all nodes it protects are on confirmed fixed kernels, including any pools it targets through automation. Older/unverified configurations must keep the applicable protection.

If you deployed the self-service kernel-lpe-mitigate or legacy cve-2026-31431-mitigate DaemonSet, first update its deployment source so it will not be recreated, then remove that specific deployment once the covered nodes are fixed. Deleting the DaemonSet does not delete the host configuration it already wrote. The advisory's combined DaemonSet used /etc/modprobe.d/disable-kernel-lpe.conf.

Prefer node replacement with an image/provisioning combination that no longer applies the temporary rules. If restrictions persist on confirmed fixed nodes, identify the owner of each configuration file before changing it. Do not delete entire CIS configuration files, clear all modprobe rules, or remove Canonical/package-managed policy. Do not apply host-rule cleanup to excluded pools.

For nodes still relying on mitigation, blocking future module loads does not neutralize a vulnerable module that is already loaded. Follow the applicable mitigation procedure, including safe unloading or reboot/node replacement. Conversely, absence of a blacklist on a fixed kernel does not indicate vulnerability.

🤖 Generated by GitHub Copilot

Activity

  1. LucaIcaro commented on May 1, 2026

    @LucaIcaro

    I have not run the workaround yet, but I wanted to post this result from one of our AKS clusters:

    kubectl run py-debug --image=python:3.12-slim --
    restart=Never --rm -it \
                                                     --overrides='{"spec":{"securityContext":{"
    runAsNonRoot":true,"runAsUser":1000,"runAsGroup":1000}}}' \
                                                     -- bash
    If you don't see a command prompt, try pressing enter.
    I have no name!@py-debug:/$ whoami
    whoami: cannot find name for user ID 1000
    I have no name!@py-debug:/$ cat << 'EOF' > /tmp/copy_fail_exp.py
    > #!/usr/bin/env python3
    import os as g,zlib,socket as s
    ...removed the exploit that can be found on https://copy.fail/
    g.system("su")
    > EOF
    I have no name!@py-debug:/$ chmod +x /tmp/copy_fail_exp.py
    I have no name!@py-debug:/$ ./tmp/copy_fail_exp.py
    # whoami
    root
    # id
    uid=0(root) gid=1000 groups=1000
    # exit
    I have no name!@py-debug:/$
    
  2. djsly commented on May 1, 2026

    @djsly
    ContributorAuthor

    Thank you for reporting this Luca Bevilacqua (@LucaIcaro). This confirms the vulnerability is exploitable on current AKS nodes. I have updated the description with the more up to date reality.

    Why this works

    While algif_aead is not loaded by default on AKS nodes, the Linux kernel's module auto-loading mechanism (request_module) will automatically load it when any process — even an unprivileged one — creates an AF_ALG socket with AEAD type. This is exactly what the exploit does.

    In your case:

    • The pod runs as non-root (UID 1000) ✅
    • The exploit creates an AF_ALG socket → kernel auto-loads algif_aead → exploits the vulnerability → gains root on the node ❌

    What to do now

    Apply the mitigation DaemonSet from the advisory above. It blocks the module from being auto-loaded by creating a modprobe rule (install algif_aead /bin/false). Once blocked, the kernel cannot auto-load the module, and the exploit will fail.

    # Apply mitigation (copy the DaemonSet YAML from the advisory above)
    kubectl apply -f cve-2026-31431-mitigate.yaml
    
    # Verify on each node
    kubectl logs -n kube-system -l app=cve-2026-31431-mitigate

    The AKS team is actively rolling out hotfix VHDs that include this mitigation baked in. New nodes created from patched VHDs will be protected automatically.

  3. LucaIcaro commented on May 1, 2026

    @LucaIcaro

    Sylvain Boily (@djsly) confirmed that the workaround works

    I have no name!@py-debug:/$ ./tmp/copy_fail_exp.py 
    Traceback (most recent call last):
      File "//./tmp/copy_fail_exp.py", line 9, in <module>
        while i<len(e):c(f,i,e[i:i+4]);i+=4
                       ^^^^^^^^^^^^^^^
      File "//./tmp/copy_fail_exp.py", line 5, in c
        a=s.socket(38,5,0);a.bind(("aead","authencesn(hmac(sha256),cbc(aes))"));h=279;v=a.setsockopt;v(h,1,d('0800010000000010'+'0'*64));v(h,5,None,4);u,_=a.accept();o=t+4;i=d('00');u.sendmsg([b"A"*4+c],[(h,3,i*4),(h,2,b'\x10'+i*19),(h,4,b'\x08'+i*3),],32768);r,w=g.pipe();n=g.splice;n(f,w,o,offset_src=0);n(r,u.fileno(),o)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory
    
  4. djsly commented on May 1, 2026

    @djsly
    ContributorAuthor

    🚀 Hotfix Globally Deployed — May 1, 2026

    Both hotfixed AgentBaker service versions are now globally deployed:

    Release Branch Status
    v20260413 ✅ Globally deployed
    v20260424 ✅ Globally deployed

    What this means for you

    • New node pools and node image upgrades (az aks nodepool upgrade --node-image-only) will automatically pick up the CVE-2026-31431 mitigation.

    Action required for existing nodes

    Nodes that were created before this deployment are still unprotected. To protect them, you can either:

    1. Node image upgrade (recommended): az aks nodepool upgrade -g <rg> -n <nodepool> --cluster-name <cluster> --node-image-only
    2. Self-service DaemonSet: Apply the mitigation DaemonSet described in this issue for immediate protection without node disruption.
  5. rovangju commented on May 1, 2026

    @rovangju

    Would it make sense to suggest a higher PriorityClass on the DaemonSet example?
    And is the hostNetwork: true necessary?

  6. djsly commented on May 1, 2026

    @djsly
    ContributorAuthor

    Great suggestions Justin Rovang (@rovangju) — both valid. Updated the DaemonSet definitions:

    1. Added priorityClassName: system-node-critical — ensures the mitigation pods get scheduled even under node resource pressure. This is a node-level security fix so it warrants critical priority.

    2. Removed hostNetwork: true — you're right, it's not needed. The DaemonSet only writes modprobe config to the host filesystem and runs rmmod/modprobe via chroot. No network operations involved.

    3. Added resource requests/limits — minimal footprint (10m CPU, 16Mi/32Mi memory) since the pod just runs a one-shot script then sleep infinity.

    Both the mitigation and rollback DaemonSets in the advisory above have been updated. Thanks for the review! 👍

  7. TripleEmcoder commented on May 2, 2026

    @TripleEmcoder

    What's the status on the Container App front? Is there a separate tracking issue somewhere?

  8. added a commit that references this issue on May 2, 2026
  9. j-chao commented on May 3, 2026

    @j-chao

    should the mitigation verification command when using kubectl debug be:

    grep -qs "algif_aead" /host/etc/modprobe.d/*.conf && echo "✅ Mitigation is active" || echo "⚠️ VULNERABLE: No mitigation found"
    

    (checking under /host/etc instead of /etc).

    instead?

  10. huf1 commented on May 3, 2026

    @huf1

    should the mitigation verification command when using kubectl debug be:

    grep -qs "algif_aead" /host/etc/modprobe.d/*.conf && echo "✅ Mitigation is active" || echo "⚠️ VULNERABLE: No mitigation found"
    

    (checking under /host/etc instead of /etc).

    instead?

    can confirm, that running it with /etc (without /host) it still prints "⚠️ VULNERABLE: No mitigation found"

  11. 34 remaining items

  12. obriegr0909 commented on May 12, 2026

    @obriegr0909

    Is anyone else getting false positive alerts from Defender for Containers when deploying the DaemonSet? Seems the Defender runtime sensor is detecting some keywords in the DaemonSet yaml manifest itself?

    Image
  13. huf1 commented on May 12, 2026

    @huf1

    Is anyone else getting false positive alerts from Defender for Containers when deploying the DaemonSet? Seems the Defender runtime sensor is detecting some keywords in the DaemonSet yaml manifest itself?

    Image

    yes, same in our azure defender

  14. Exvitermin commented on May 12, 2026

    @Exvitermin

    Is anyone else getting false positive alerts from Defender for Containers when deploying the DaemonSet? Seems the Defender runtime sensor is detecting some keywords in the DaemonSet yaml manifest itself?

    Image

    Same here.

  15. djsly commented on May 13, 2026

    @djsly
    ContributorAuthor

    I have been told by the MSDefender team that this false positive was resolved yesterday.

  16. christian-heusel commented on May 13, 2026

    @christian-heusel

    Sylvain Boily (@djsly) will this advisory also be updated for fragnesia / "copyfail 3.0" (CVE-2026-46300) or should I file a separate issue to track it?

    https://www.openwall.com/lists/oss-security/2026/05/13/5

  17. kkrypt0nn commented on May 13, 2026

    @kkrypt0nn

    However, it is in the same surface and the mitigation is the same as for dirtyfrag.

    It very much doesn't need a new issue, at most a "PS" that the CVE is already covered by the mitigations in place.

  18. kzzalews commented on May 13, 2026

    @kzzalews

    Fragnesia (CVE-2026-46300) — empirical confirmation on Ubuntu 22.04 / kernel 5.15 · Kyverno Level-3 PSS does not mitigate

    Following @christian-heusel's question above — tested today on an AKS node running 5.15.0-1110-azure.

    Methodology

    • Pod security context: runAsUser: 65534 (nobody) · allowPrivilegeEscalation: false · capabilities: drop: [ALL] — Kyverno Level-3 PSE-compliant, no privileged flag
    • Compiled v12-security/pocs/fragnesia with gcc fragnesia.c -o exp inside the pod as UID 65534
    • Ran ./exp as nobody

    Result

    [*] uid=65534 euid=65534 gid=65534 egid=65534
    [*] smashing 192 bytes into read-only page cache  changed=176  skipped=16
    [+] BUG: changed requested copied byte range to desired values
    # whoami
    root
    

    Conclusions

    1. allowPrivilegeEscalation: false (no_new_privs=1) does not block this exploit. unshare(CLONE_NEWUSER | CLONE_NEWNET) is unaffected by no_new_privs; pod security policies at the Kubernetes layer offer no protection here.
    2. Kernel 5.15 is in scope. unprivileged_userns_clone=1 and no apparmor_restrict_unprivileged_userns sysctl (does not exist on 5.15) — preconditions identical to the DirtyFrag xfrm-ESP path.
    3. The existing DirtyFrag mitigation fully covers Fragnesia. Same surface (esp4/esp6 modules), same blacklist, same DaemonSet from this advisory. No additional action needed beyond what was already recommended.

    ⚠️ Cleanup note for reproducers: If running the PoC inside a Kyverno-compliant pod (no CAP_SYS_ADMIN), echo 1 > /proc/sys/vm/drop_caches will fail — /usr/bin/su remains poisoned in the page cache until natural eviction or reboot. Use a privileged system pod (e.g. kubectl exec -n kube-system <kube-proxy-pod>) or kubectl debug node/ to flush after the test.

    The test script has been updated to include Step 4 — Fragnesia: dirtyfrag-cve-test.sh — now covers CVE-2026-43284, CVE-2026-43500, CVE-2026-31431, CVE-2026-46300.


    Written by: Aiko (Claude Sonnet 4.6) · Lv. 16.7 · 2026-05-13 · on behalf of Karol Zalewski
    Human review: Test executed and output observed directly by Karol Zalewski (Platform/DevOps Engineer). Analysis and write-up reviewed and approved by Karol before posting.
    Context: Source: v12-security/pocs/fragnesia · #5753
    Note: The exploit was executed inside a Kubernetes pod, not directly on the host. Root shell confirms kernel-level privilege escalation via the xfrm ESP-in-TCP code path. No container escape was attempted or tested.

  19. changed the title [-]Kernel LPE Vulnerabilities (Copy Fail + DirtyFrag) — AKS Advisory & Mitigation Guide[/-] [+]Kernel LPE Vulnerabilities (Copy Fail + DirtyFrag + Fragnesia) — AKS Advisory & Mitigation Guide[/+] on May 13, 2026
  20. changed the title [-]Kernel LPE Vulnerabilities (Copy Fail + DirtyFrag + Fragnesia) — AKS Advisory & Mitigation Guide[/-] [+]Kernel LPE vulnerabilities (Copy Fail, DirtyFrag and Fragnesia) - AKS remediation guidance[/+] on Sep 9, 2026
  21. djsly commented on Sep 9, 2026

    @djsly
    ContributorAuthor

    The advisory has been updated with verified fixed-kernel image minimums, upgrade instructions and separate mitigation-cleanup status. This replaces the earlier statements that Ubuntu fixes were still pending.

    For the explicitly covered kernel families, the Ubuntu kernel-fix floor is 202606.08.1; Ubuntu 22.04/24.04 cleanup shipped with VHD 202607.29.0. The standard Azure Linux 3.0 host-kernel floor is 202605.27.0. These minimums do not extend to excluded kernel families, and existing nodes must consume the applicable image upgrade.

    Ubuntu 20.04 FIPS already has fixed kernels, but its obsolete module restrictions are addressed separately in Azure/AgentBaker#9431. That PR is not yet merged or released. This advisory remains open until the cleanup ships and its release vehicle is recorded here.

    🤖 Generated by GitHub Copilot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions