Skip to content

[cherry-pick v20260424] fix: mitigate CVE-2026-31431 (Copy Fail) algif_aead LPE#8444

Merged
Devinwong merged 4 commits into
official/v20260424from
cherry-pick/official-v20260424/cve-2026-31431
May 1, 2026
Merged

[cherry-pick v20260424] fix: mitigate CVE-2026-31431 (Copy Fail) algif_aead LPE#8444
Devinwong merged 4 commits into
official/v20260424from
cherry-pick/official-v20260424/cve-2026-31431

Conversation

@djsly
Copy link
Copy Markdown
Collaborator

@djsly djsly commented May 1, 2026

Cherry-pick of CVE-2026-31431 mitigation from PR #8437 to release branch official/v20260424.

Changes

  • modprobe-CIS.conf: Block algif_aead module (install + blacklist)
  • cse_main.sh: Runtime mitigation for existing VHDs (Ubuntu + AzureLinux)

CVE Details

  • CVE-2026-31431 — Local privilege escalation (CVSS 7.8 HIGH) via algif_aead kernel module
  • No kernel fix available yet — mitigation disables the module
  • AB#37761004

djsly and others added 3 commits April 30, 2026 21:19
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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Changes cached containers or packages on windows VHDs

Please 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.

  • Additions are new things cached.
  • Deletions are things no longer cached.
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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_aead if 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
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
install algif_aead /bin/false
install algif_aead /bin/true

Copilot uses AI. Check for mistakes.
Comment on lines +292 to +293
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
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +295 to +300
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
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@Devinwong
Copy link
Copy Markdown
Collaborator

Bypassing because it failed with quota exceeded and we are in a rush.

@Devinwong Devinwong merged commit 8ad5e47 into official/v20260424 May 1, 2026
20 of 26 checks passed
@Devinwong Devinwong deleted the cherry-pick/official-v20260424/cve-2026-31431 branch May 1, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants