Linux Kernel AppArmor Out-of-Bounds Read Vulnerability in DFA Character Matching

Vulnerability

A vulnerability in the Linux kernel's AppArmor module has been identified, where the 'match_char()' macro can cause out-of-bounds reads. This issue arises because the macro evaluates its character parameter multiple times when processing differential encoding chains. When the macro is called with 'str++', the string pointer advances with each iteration of the inner loop, leading the Deterministic Finite Automaton (DFA) to skip characters and potentially read past the input buffer's end. This flaw was reported by Qualys Security Advisory and affects Linux kernel versions prior to 6.19.0-rc7-next-20260127.

Impact

Exploitation of this vulnerability causes a slab-out-of-bounds error, where the kernel reads memory outside the allocated buffer, potentially leading to information disclosure or memory corruption.

Reproduction

The vulnerability can be reproduced by using a version of the Linux kernel that is prior to the fixed version, with the AppArmor security module enabled. The issue manifests when the 'match_char()' macro is used in a way that advances the string pointer 'str' with each iteration, causing the DFA to miss characters and read out of bounds.

Remediation

Users can upgrade to the latest stable version of the Linux kernel to address this vulnerability.

Added: Apr 1, 2026, 9:26 AM
Updated: Apr 1, 2026, 9:26 AM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
0.6
exploitability
4.3
remediation
7.7
relevance
5.1
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.