Threat reportVulnerabilityTL-2026-0228
CrackArmor — 9 Linux AppArmor Confused Deputy Vulnerabilities Enable Root Privilege Escalation and Container Escape
Qualys Threat Research Unit discovered 9 confused deputy vulnerabilities in the Linux kernel AppArmor LSM module (kernel 4.11+ since 2017) affecting 12.6 million enterprise systems. Unprivileged local attackers can manipulate AppArmor security profiles via securityfs pseudo-files to achieve root privilege escalation, bypass container isolation, defeat KASLR, and cause denial of service via kernel stack exhaustion.
Key facts
| Identifiers | TL-2026-0228 |
|---|---|
| Also known as | CrackArmor |
| Severity | HIGH |
| CVSS | 8.4 (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| Affected products | Linux Linux Kernel (AppArmor LSM); Canonical Ubuntu; Debian Debian GNU/Linux; SUSE SUSE Linux Enterprise / openSUSE; Canonical sudo; Canonical util-linux |
| Weaknesses (CWE) | CWE-269, CWE-674, CWE-125, CWE-416, CWE-415 |
| MITRE ATT&CK techniques | T1003 OS Credential Dumping, T1014 Rootkit, T1059 Command and Scripting Interpreter, T1068 Exploitation for Privilege Escalation, T1078 Valid Accounts, T1082 System Information Discovery, T1222 File and Directory Permissions Modification, T1499 Endpoint Denial of Service, T1548 Abuse Elevation Control Mechanism, T1611 Escape to Host, T1685 Disable or Modify Tools |
| Motivation | UNKNOWN |
| Target sectors | government, financial, healthcare, technology, telecommunications, energy, defense, cloud-services, education |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 8 cited sources |
Detection coverage
As of 2026-03-14, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-0228 across Splunk SPL, Microsoft KQL and Sigma, covering 17 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: CrackArmor Post-Exploitation — sudo MAIL_CONFIG Privilege Escalation Chain
Detects sudo execution with the MAIL_CONFIG environment variable set to a non-standard path. In the CrackArmor user-space LPE chain, an AppArmor profile denying CAP_SETUID to sudo causes setresuid() to fail silently, then sudo executes sendmail (Postfix) as root using attacker-controlled configuration via MAIL_CONFIG, achieving arbitrary code execution as root.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1548, T1068, T1059.004
- Data sources: sysmon, linux_process_creation
- Severity: critical
- Confidence: high
Splunk SPL
index=sysmon sourcetype="linux:sysmon" EventCode=1 Image="*/sudo" (CommandLine="*MAIL_CONFIG=*" OR ParentCommandLine="*MAIL_CONFIG=*")
| eval mail_config_path=mvindex(split(mvindex(split(CommandLine, "MAIL_CONFIG="), 1), " "), 0)
| eval is_standard_path=if(match(mail_config_path, "^/etc/postfix"), "yes", "no")
| where is_standard_path="no"
| stats count min(_time) as first_seen max(_time) as last_seen values(User) as users values(mail_config_path) as mail_config_paths by host, Image, CommandLine
| eval alert_msg="CrackArmor: sudo with non-standard MAIL_CONFIG detected — LPE chain indicator"
| table _time, host, users, Image, CommandLine, mail_config_paths, alert_msgMicrosoft KQL
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName == "sudo"
| where ProcessCommandLine has "MAIL_CONFIG=" or InitiatingProcessCommandLine has "MAIL_CONFIG="
| extend MailConfigPath = extract(@"MAIL_CONFIG=([^\s]+)", 1, ProcessCommandLine)
| where isnotempty(MailConfigPath) and MailConfigPath !startswith "/etc/postfix"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, MailConfigPath, InitiatingProcessFileName, ProcessId
| summarize Count=count(), FirstSeen=min(Timestamp), LastSeen=max(Timestamp) by DeviceName, AccountName, ProcessCommandLine, MailConfigPathSigma
title: CrackArmor — sudo MAIL_CONFIG Privilege Escalation Chain
id: bd6a8fa4-a5b7-4e4c-d4f9-0bc26abe5d34
status: experimental
description: Detects sudo execution with MAIL_CONFIG environment variable pointing to non-standard path — indicates CrackArmor LPE chain where sudo runs Postfix with attacker-controlled configuration as root
references:
- https://blog.qualys.com/vulnerabilities-threat-research/2026/03/12/crackarmor-critical-apparmor-flaws-enable-local-privilege-escalation-to-root
author: Threadlinqs Team
date: 2026/03/14
tags:
- attack.privilege_escalation
- attack.t1548
- attack.t1068
- attack.execution
- attack.t1059.004
logsource:
product: linux
category: process_creation
detection:
selection_sudo:
Image|endswith: '/sudo'
selection_mailconfig:
CommandLine|contains: 'MAIL_CONFIG='
filter_standard:
CommandLine|contains: 'MAIL_CONFIG=/etc/postfix'
condition: selection_sudo and selection_mailconfig and not filter_standard
falsepositives:
- Custom Postfix configurations using non-standard paths for legitimate multi-instance setups
- Development or testing environments with custom mail configurations
level: criticalKnown false positives:
- Custom Postfix configurations using non-standard paths for legitimate multi-instance setups
- Development or testing environments with custom mail configurations
Tuning notes: Whitelist known legitimate MAIL_CONFIG paths used in multi-instance Postfix setups. Correlate with AppArmor profile changes targeting sudo within a 60-second window for higher confidence. Exclude CI/CD service accounts with known custom mail configurations.
- CrackArmor Exploitation — su PTY Mode Confused Deputy Attack Chain · unlock with TL Creds
- CrackArmor Post-Exploitation — AppArmor Profile Manipulation Targeting System Services · unlock with TL Creds
- CrackArmor C2/Lateral — Kernel Stack Exhaustion via Deeply Nested AppArmor Profiles · unlock with TL Creds
- CrackArmor Exploitation — dup2 File Descriptor Redirection to AppArmor Securityfs · unlock with TL Creds
- CrackArmor Post-Exploitation — Unauthorized [indicator] Modification · unlock with TL Creds
- CrackArmor C2/Lateral — Container Escape via AppArmor Profile Bypass · unlock with TL Creds
- CrackArmor Exploitation — Securityfs Pseudo-File Write Access by Unprivileged Process · unlock with TL Creds
- CrackArmor C2/Lateral — AppArmor Profile Removal of Critical System Services · unlock with TL Creds
Indicators of compromise
As of 2026-03-14, Threadlinqs Intelligence tracks 17 indicators of compromise for TL-2026-0228.
Technical analysis
CrackArmor is a collection of nine vulnerabilities discovered by the Qualys Threat Research Unit (TRU) in the Linux kernel's AppArmor Linux Security Module (LSM). AppArmor is a mandatory access control (MAC) framework that confines programs to a limited set of resources, and is enabled by default on Ubuntu, Debian, and SUSE distributions. The vulnerabilities have existed since Linux kernel version 4.11 (2017), impacting an estimated 12.6 million enterprise Linux systems worldwide.
The core vulnerability class is "confused deputy" — AppArmor's securityfs pseudo-files (.load, .replace, .remove) under /sys/kernel/security/apparmor/ are created with world-writable permissions (mode 0666), allowing any unprivileged user to open them for writing. While direct writes fail with EACCES, attackers can use the dup2() syscall to redirect a privileged program's output (such as su in PTY mode) through these file descriptors, effectively loading, replacing, or removing arbitrary AppArmor profiles with full kernel privileges.
Vulnerability 1 (Confused Deputy, CWE-269): The fundamental flaw enabling all subsequent attacks. Unprivileged users open securityfs pseudo-files in O_WRONLY mode, then use dup2() to redirect privileged program stderr to these descriptors. The su command with -P (PTY) flag writes controlled binary data including null bytes, enabling arbitrary profile manipulation. This allows attackers to remove protective profiles from system services (rsyslogd, cupsd), load restrictive deny-all profiles causing denial of service, and bypass Ubuntu's unprivileged user-namespace restrictions.
Vulnerability 2 (Uncontrolled Recursion, CWE-674): The __remove_profile() function recursively calls itself via __aa_profile_list_release() without depth limits when processing nested subprofiles. An attacker can create deeply nested profile hierarchies (1024 levels: "a//x//x//x...") and trigger removal, exhausting the 16KB kernel stack on x86_64 systems. CONFIG_VMAP_STACK guard pages prevent arbitrary code execution, limiting impact to complete system crash (denial of service).
Vulnerability 3 (Out-of-Bounds Read, CWE-125): The match_char() macro evaluates arguments multiple times, causing the string pointer to increment multiple times due to MATCH_FLAG_DIFF_ENCODE logic. By crafting DFA matching patterns with wildcards followed by specific ranges, attackers can read up to 64KB past the allocated 8KB kmalloc buffer, disclosing KASLR-randomized kernel pointers including aa_global_buffers, shmem_ops, and noop_backing_dev_info addresses.
Vulnerability 4 (Use-After-Free, CWE-416): aa_loaddata structures in the kmalloc-192 slab cache are referenced by securityfs dentries without proper refcounting. A race condition exists between path_openat() acquiring a dentry reference and do_dentry_open() calling seq_rawdata_open(), while concurrent profile removal triggers kfree_sensitive() via delayed work. The race window can be widened to seconds by loading profiles with massive DFAs (~64K states). Exploitation on Ubuntu 24.04.3 involves cross-cache attacks, page table takeover via Jann Horn's technique (CVE-2020-29661), mapping /etc/passwd pages through re-allocated page tables, and writing a passwordless root entry. This is the most severe vulnerability, enabling reliable local privilege escalation to root.
Vulnerability 5 (Double-Free, CWE-415): In aa_replace_profiles(), the namespace name pointer ns_name is freed twice — first via aa_load_ent_free() at line 1262, then again via kfree(ns_name) at line 1270. The race window can be expanded to several seconds by writing 1024+ profiles with 16 subprofiles each. Exploitation on Debian 13.1 uses AF_PACKET page vectors and signalfd(-1) calls to achieve arbitrary credential modification, zeroing uid for root access. CONFIG_SLAB_BUCKETS is bypassed using user-key and AF_PACKET buffers.
Vulnerabilities 6-9 include a memory leak in verify_header(), missing namespace depth limits, out-of-bounds read/write in the DFA DEFAULT transition table, and an infinite loop in differential encoding verification.
A separate user-space local privilege escalation chain combines the confused deputy vulnerability with sudo and Postfix: loading an AppArmor profile that denies CAP_SETUID to /usr/bin/sudo causes sudo's setresuid() call to fail silently, then sudo executes sendmail (Postfix) while still running as root. The attacker controls Postfix configuration via the MAIL_CONFIG environment variable, achieving arbitrary code execution as root.
Patches were developed across 11 commits and merged upstream to Linus's kernel tree on 2026-03-12. Ubuntu, Debian, and SUSE have released corresponding security updates. No CVE identifiers have been assigned at the time of publication. PoC code has been withheld to allow patching, though detailed exploitation methodology is documented in the Qualys advisory.
MITRE ATT&CK techniques by tactic:
credential-access
defense-evasion
T1014 Rootkit; T1078 Valid Accounts
execution
T1059 Command and Scripting Interpreter
privilege-escalation
T1068 Exploitation for Privilege Escalation; T1548 Abuse Elevation Control Mechanism; T1611 Escape to Host
discovery
T1082 System Information Discovery
defense-impairment
T1222 File and Directory Permissions Modification; T1685 Disable or Modify Tools
impact
Remediation
Patches
- Linux kernel patches: 11 commits merged upstream 2026-03-12
- Ubuntu: Kernel updates for Trusty through Questing Quokka (Launchpad Bug #2143853)
- Ubuntu sudo fix: Launchpad Bug #2143042
- Ubuntu util-linux fix: Launchpad Bug #2143850
- Sudo commit 3e474c2: Make setuid/setgid/setgroups failure fatal
- Upstream patches: PATCH 01-11/11 apparmor series
Immediate actions
- Apply kernel security updates immediately on all Ubuntu, Debian, and SUSE systems
- Run sudo apt update && sudo apt upgrade on Debian/Ubuntu systems
- Reboot systems after kernel updates to load patched kernel
- Update sudo package to patched versions (1.9.15p5-3ubuntu5.24.04.2 on Noble, 1.9.9-1ubuntu2.6 on Jammy)
- Update util-linux package to hardened versions (2.39.3-9ubuntu6.5 on Noble, 2.37.2-4ubuntu3.5 on Jammy)
- Monitor for unauthorized AppArmor profile modifications via auditd
- Restrict access to /sys/kernel/security/apparmor/ pseudo-files where possible
Workarounds
- Restrict permissions on /sys/kernel/security/apparmor/.load, .replace, .remove files
- Disable AppArmor if not required (reduces attack surface but removes MAC protections)
- Limit local user access on critical systems until patches are applied
- Monitor for anomalous su -P usage and MAIL_CONFIG environment variable manipulation
Longer-term hardening
- Deploy kernel live-patching solutions for rapid vulnerability response
- Implement auditd rules monitoring securityfs write operations
- Deploy EDR with behavioral detection for privilege escalation patterns
- Restrict unprivileged user namespace creation where not needed
- Implement container runtime security monitoring for escape attempts
- Review and harden AppArmor profile configurations across fleet
- Enable CONFIG_VMAP_STACK to mitigate stack exhaustion attacks
Affected and fixed versions
- Linux — Linux Kernel (AppArmor LSM)
Vulnerable versions: 4.11 through 6.x (all versions since 2017)
Fixed in: Patched upstream 2026-03-12 - Canonical — Ubuntu
Vulnerable versions: 14.04 LTS (Trusty); 16.04 LTS (Xenial); 18.04 LTS (Bionic); 20.04 LTS (Focal); 22.04 LTS (Jammy); 24.04 LTS (Noble); 25.10 (Questing Quokka)
Fixed in: Patched kernel packages available for all supported releases - Debian — Debian GNU/Linux
Vulnerable versions: All versions with AppArmor enabled
Fixed in: Security updates pending/available - SUSE — SUSE Linux Enterprise / openSUSE
Vulnerable versions: All versions with AppArmor enabled
Fixed in: Security updates pending/available - Canonical — sudo
Vulnerable versions: Versions prior to 1.9.15p5-3ubuntu5.24.04.2 (Noble); Versions prior to 1.9.9-1ubuntu2.6 (Jammy)
Fixed in: 1.9.15p5-3ubuntu5.24.04.2 (Noble); 1.9.9-1ubuntu2.6 (Jammy) - Canonical — util-linux
Vulnerable versions: Versions prior to 2.39.3-9ubuntu6.5 (Noble); Versions prior to 2.37.2-4ubuntu3.5 (Jammy)
Fixed in: 2.39.3-9ubuntu6.5 (Noble); 2.37.2-4ubuntu3.5 (Jammy)
Timeline
- Vulnerable AppArmor securityfs pseudo-file permissions introduced in Linux kernel v4.11
- Qualys TRU reports first batch of AppArmor vulnerabilities to Ubuntu/Canonical security team
- Additional vulnerability batches sent to Ubuntu/Canonical security team
- Disclosure coordination concerns raised between Qualys and vendors
- Continued disclosure timeline discussions between Qualys TRU and affected vendors
- Coordinated public disclosure date set for March 3, 2026 (later shifted to March 12)
- Patch development iterations begin; 5 versions developed through March 5
- Final patch version (v5) completed covering all 9 vulnerabilities across 11 commits
- Qualys TRU publishes CrackArmor advisory; Ubuntu releases kernel, sudo, and util-linux security updates
- All 11 AppArmor patches merged upstream to Linus Torvalds' kernel tree
- Widespread media coverage begins; The Hacker News and security outlets report on CrackArmor findings
- As of 2026-05-29, CrackArmor (9 Linux AppArmor LPE flaws) remains PATCHED: upstream kernel fixes merged 2026-03-12 with Ubuntu/Debian/SUSE/Azure Linux updates shipping, and CVE-2026-23268 through -23411 now assigned. No in-the-wild exploitation or CISA KEV listing reported; Qualys still withholds PoC and exploitation needs local access.
Sources cited
- CrackArmor Technical Advisory — Qualys TRU qualys.com · Advisory · 2026-03-10
- CrackArmor Vulnerabilities — Ubuntu Security ubuntu.com · Advisory · 2026-03-12
- CrackArmor: Critical AppArmor Flaws Enable Local Privilege Escalation to Root — Qualys Blog blog.qualys.com · Research · 2026-03-12
- AppArmor Vulnerability Fixes Available — Ubuntu Blog ubuntu.com · Vendor report · 2026-03-12
- Linux Kernel AppArmor Bug — Launchpad #2143853 bugs.launchpad.net · Vendor report · 2026-03-12
- Sudo Bug — Launchpad #2143042 bugs.launchpad.net · Vendor report · 2026-03-12
- Util-linux Bug — Launchpad #2143850 bugs.launchpad.net · Vendor report · 2026-03-12
- Nine CrackArmor Flaws in Linux AppArmor Enable Root Escalation, Bypass Container Isolation — The Hacker News The Hacker News · News · 2026-03-13
Previous and next in vulnerability
Drafted by the Threadlinqs research pipeline from 8 sources; published ; last updated —.