[cherry-pick v20260424] fix: mitigate CVE-2026-31431 (Copy Fail) algif_aead LPE#8444
Conversation
Disable algif_aead kernel module to mitigate local privilege escalation vulnerability (CVSS 7.8 HIGH) until kernel fix is available (~21 days). VHD build: Add 'install algif_aead /bin/false' to modprobe-CIS.conf CSE provisioning: Apply runtime mitigation on existing VHDs (creates modprobe config + rmmod if module is loaded) Per Canonical advisory: https://ubuntu.com/blog/copy-fail-vulnerability-fixes-available AB#37761004 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The algif_aead vulnerability affects all Linux kernels >=4.15, not just Ubuntu. Extend CSE runtime mitigation to also cover AzureLinux/Mariner. VHD build was already covered since modprobe-CIS.conf is shared across all OS builds (Ubuntu, AzureLinux, ACL, Flatcar). Ubuntu 20.04 FIPS is also covered (same shared config + CSE path). AB#37761004 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add 'blacklist algif_aead' alongside install rule for CIS consistency - Log success/failure of rmmod with actionable reboot guidance - Only attempt rmmod when module is actually loaded AB#37761004 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Changes cached containers or packages on windows VHDsPlease get a Windows SIG member to approve. The following dif file shows any additions or deletions from what will be cached on windows VHDs organised by VHD type.
diff --git a/vhd_files/2022-containerd-gen2.txt b/vhd_files/2022-containerd-gen2.txt
index a67cc2d..1005317 100644
--- a/vhd_files/2022-containerd-gen2.txt
+++ b/vhd_files/2022-containerd-gen2.txt
@@ -4 +4 @@ c:\akse-cache\: https://packages.aks.azure.com/ccgakvplugin/v1.1.5/binaries/wind
-c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.1/windows-amd64.zip
+c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.0/windows-amd64.zip
diff --git a/vhd_files/2022-containerd.txt b/vhd_files/2022-containerd.txt
index abc0646..9fc80b7 100644
--- a/vhd_files/2022-containerd.txt
+++ b/vhd_files/2022-containerd.txt
@@ -4 +4 @@ c:\akse-cache\: https://packages.aks.azure.com/ccgakvplugin/v1.1.5/binaries/wind
-c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.1/windows-amd64.zip
+c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.0/windows-amd64.zip
diff --git a/vhd_files/2025-gen2.txt b/vhd_files/2025-gen2.txt
index 7c9a9ca..aef5fe3 100644
--- a/vhd_files/2025-gen2.txt
+++ b/vhd_files/2025-gen2.txt
@@ -4 +4 @@ c:\akse-cache\: https://packages.aks.azure.com/ccgakvplugin/v1.1.5/binaries/wind
-c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.1/windows-amd64.zip
+c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.0/windows-amd64.zip
diff --git a/vhd_files/2025.txt b/vhd_files/2025.txt
index 9a53a2a..ce16499 100644
--- a/vhd_files/2025.txt
+++ b/vhd_files/2025.txt
@@ -4 +4 @@ c:\akse-cache\: https://packages.aks.azure.com/ccgakvplugin/v1.1.5/binaries/wind
-c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.1/windows-amd64.zip
+c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.0/windows-amd64.zip
diff --git a/vhd_files/23H2-gen2.txt b/vhd_files/23H2-gen2.txt
index baa32a3..719173c 100644
--- a/vhd_files/23H2-gen2.txt
+++ b/vhd_files/23H2-gen2.txt
@@ -4 +4 @@ c:\akse-cache\: https://packages.aks.azure.com/ccgakvplugin/v1.1.5/binaries/wind
-c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.1/windows-amd64.zip
+c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.0/windows-amd64.zip
diff --git a/vhd_files/23H2.txt b/vhd_files/23H2.txt
index b30587b..01bb92f 100644
--- a/vhd_files/23H2.txt
+++ b/vhd_files/23H2.txt
@@ -4 +4 @@ c:\akse-cache\: https://packages.aks.azure.com/ccgakvplugin/v1.1.5/binaries/wind
-c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.1/windows-amd64.zip
+c:\akse-cache\aks-secure-tls-bootstrap-client\: https://github.com/Azure/aks-secure-tls-bootstrap/releases/download/client/v1.1.0/windows-amd64.zip |
There was a problem hiding this comment.
Pull request overview
Cherry-picks a mitigation for CVE-2026-31431 by preventing the algif_aead kernel module from being loaded on new VHDs (via modprobe config) and applying a runtime safeguard during provisioning (via CSE) for existing VHDs.
Changes:
- Update shared CIS modprobe configuration to disable
algif_aead. - Add CSE runtime logic to ensure a disabling modprobe rule exists and attempt to unload
algif_aeadif currently loaded.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| parts/linux/cloud-init/artifacts/modprobe-CIS.conf | Adds algif_aead install/blacklist rules to mitigate the CVE at build-time for new VHDs. |
| parts/linux/cloud-init/artifacts/cse_main.sh | Adds provisioning-time mitigation to create a disable rule and unload the module on Ubuntu/AzureLinux/Mariner for existing VHDs. |
| blacklist usb-storage | ||
| # CVE-2026-31431 (Copy Fail): Disable algif_aead to mitigate LPE vulnerability | ||
| # until kernel fix is available. See https://ubuntu.com/blog/copy-fail-vulnerability-fixes-available | ||
| install algif_aead /bin/false |
There was a problem hiding this comment.
modprobe-CIS.conf consistently disables modules with install <module> /bin/true + blacklist <module>, but this change uses /bin/false for algif_aead. Using /bin/false makes modprobe algif_aead fail and could cause unexpected failures in any consumers that attempt to load it. Consider aligning to /bin/true like the other entries, or add a short note explaining why algif_aead is intentionally different here.
| install algif_aead /bin/false | |
| install algif_aead /bin/true |
| if ! grep -qs "algif_aead" /etc/modprobe.d/*.conf 2>/dev/null; then | ||
| printf "install algif_aead /bin/false\nblacklist algif_aead\n" > /etc/modprobe.d/disable-algif_aead.conf |
There was a problem hiding this comment.
The idempotency check treats any occurrence of the string algif_aead in any /etc/modprobe.d/*.conf as “already mitigated”. That can produce false positives (e.g., comments/aliases) and skip writing the required install ... /bin/false + blacklist ... rules. Consider checking specifically for the required directives (or ensuring the expected file exists with correct contents) before deciding to skip creating/updating the mitigation file.
| if ! grep -qs "algif_aead" /etc/modprobe.d/*.conf 2>/dev/null; then | |
| printf "install algif_aead /bin/false\nblacklist algif_aead\n" > /etc/modprobe.d/disable-algif_aead.conf | |
| if ! grep -qsE '^[[:space:]]*install[[:space:]]+algif_aead[[:space:]]+/bin/false([[:space:]]|$)' /etc/modprobe.d/disable-algif_aead.conf 2>/dev/null || \ | |
| ! grep -qsE '^[[:space:]]*blacklist[[:space:]]+algif_aead([[:space:]]|$)' /etc/modprobe.d/disable-algif_aead.conf 2>/dev/null; then | |
| tee /etc/modprobe.d/disable-algif_aead.conf > /dev/null <<'EOF' | |
| install algif_aead /bin/false | |
| blacklist algif_aead | |
| EOF |
| if grep -q '^algif_aead ' /proc/modules 2>/dev/null; then | ||
| if rmmod algif_aead 2>/dev/null; then | ||
| echo "CVE-2026-31431: successfully unloaded algif_aead module" | ||
| else | ||
| echo "CVE-2026-31431: failed to unload algif_aead (in use), reboot required for full mitigation" | ||
| fi |
There was a problem hiding this comment.
rmmod algif_aead will fail if the module has dependents, even when unloading would otherwise be possible. Using modprobe -r algif_aead is generally more robust because it removes dependencies in the right order and yields clearer failure modes for the “reboot required” message.
|
Bypassing because it failed with quota exceeded and we are in a rush. |
Cherry-pick of CVE-2026-31431 mitigation from PR #8437 to release branch
official/v20260424.Changes
modprobe-CIS.conf: Blockalgif_aeadmodule (install + blacklist)cse_main.sh: Runtime mitigation for existing VHDs (Ubuntu + AzureLinux)CVE Details
algif_aeadkernel module