CVE-2026-23406 Overview
CVE-2026-23406 is an out-of-bounds read vulnerability [CWE-125] in the Linux kernel's AppArmor Linux Security Module (LSM). The flaw resides in the match_char() macro, which evaluates its character parameter multiple times when traversing differential encoding chains in the Deterministic Finite Automaton (DFA) matching code. When invoked with *str++, the string pointer advances on each iteration of the inner do-while loop. The result is an out-of-bounds read past the input buffer boundary inside aa_dfa_match(), triggered through standard file-open operations evaluated by apparmor_file_open().
Critical Impact
A local user can trigger kernel out-of-bounds reads via file operations subject to AppArmor policy evaluation, potentially leaking kernel memory or crashing the system.
Affected Products
- Linux Kernel (multiple stable branches prior to the fix commits)
- Linux Kernel 4.17 and certain 7.0 release candidates (rc1 through rc7)
- Distributions shipping AppArmor-enabled kernels (Ubuntu, Debian, SUSE, and derivatives)
Discovery Timeline
- 2026-04-01 - CVE-2026-23406 published to NVD
- 2026-04-24 - Last updated in NVD database
Technical Details for CVE-2026-23406
Vulnerability Analysis
The vulnerability is an out-of-bounds read in the AppArmor DFA matching engine. AppArmor evaluates path and file access requests by walking a compiled DFA representing the loaded security profile. The match_char() macro implements a fast inner loop for traversing differential encoding chains within DFA state transitions.
The macro takes a character parameter and references it more than once inside its expansion. When callers pass an expression with side effects such as *str++, each macro-internal reference re-evaluates the expression. The pointer increments multiple times per logical character, so the DFA compares unrelated bytes and advances past the end of the input buffer. KASAN reports a slab-out-of-bounds read of size 1 in aa_dfa_match+0x5ae/0x760, reached through apparmor_file_open() → aa_path_perm() → __aa_path_perm().
Root Cause
The root cause is unsafe macro design combined with caller misuse. match_char() is implemented as a C preprocessor macro rather than an inline function, and it references its argument more than once. Passing *str++ produces multiple pointer increments per invocation, breaking the loop invariant that the DFA advances one input character per outer iteration.
Attack Vector
The attack vector is local. A user with permission to open files under an AppArmor-confined process can craft path names that drive the DFA into differential encoding chains where the bug manifests. Exploitation requires no special privileges beyond local code execution under a confined profile. The kernel reads memory outside the intended buffer, which can leak adjacent slab contents to in-kernel decision logic or trigger a fault leading to denial of service. The fix extracts the character value into a local variable before invoking match_char(), ensuring single evaluation per outer loop iteration.
No public proof-of-concept exploit is currently published, and the issue is not listed in the CISA Known Exploited Vulnerabilities catalog. The vulnerability mechanism is described in detail across the upstream stable kernel fix commits.
Detection Methods for CVE-2026-23406
Indicators of Compromise
- Kernel log entries containing KASAN: slab-out-of-bounds in aa_dfa_match on debug or hardened builds.
- Unexpected Oops, BUG, or general protection faults originating in aa_dfa_match, __aa_path_perm, or apparmor_file_open call paths.
- Repeated AppArmor audit denials or anomalous policy evaluation failures from a single confined process.
Detection Strategies
- Inventory running kernel versions across the Linux fleet and correlate against the fixed commit hashes published on git.kernel.org/stable.
- Enable KASAN on test or canary hosts to surface latent out-of-bounds reads during fuzzing of AppArmor-confined workloads.
- Monitor dmesg and journalctl -k for AppArmor-related stack traces and forward kernel logs to a centralized analytics pipeline.
Monitoring Recommendations
- Centralize kernel telemetry and AppArmor audit events into a SIEM or data lake for cross-host correlation of repeated aa_dfa_match faults.
- Alert on processes that generate high volumes of AppArmor policy evaluations on unusual path patterns, which can indicate fuzzing or targeted probing.
- Track kernel package versions through endpoint inventory tooling so that unpatched hosts are flagged automatically after each vendor advisory.
How to Mitigate CVE-2026-23406
Immediate Actions Required
- Apply the upstream Linux kernel patches referenced by commits 0510d1b, 1fc94f1, 383b727, 5a184f7, 8756b68, b73c1df, c7dc56d, and f16f2e5 from the stable tree.
- Update to distribution-supplied kernel packages that incorporate the AppArmor match_char() fix and reboot affected hosts.
- Audit AppArmor profiles to ensure least-privilege scoping so that any residual exposure has the smallest possible blast radius.
Patch Information
The fix extracts the character value into a local variable before invoking match_char(), ensuring the macro evaluates its argument exactly once per outer loop iteration. The patch has been backported to multiple stable branches. Refer to the Kernel Git Commit 0510d1b and the additional stable backports for the authoritative source change. Consult your Linux distribution's security advisory for the specific package version that contains the fix.
Workarounds
- Where patching is delayed, restrict local user access on AppArmor-confined systems to reduce the population of actors who can reach the vulnerable code path.
- Disable AppArmor profiles on non-essential workloads only as a last resort, accepting the loss of confinement until kernels are patched.
- Deploy endpoint protection such as SentinelOne Singularity Endpoint on Linux hosts to identify post-exploitation behavior should an attacker chain this issue with other vulnerabilities.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


