CVE-2026-139107

apparmor: convert duplicated dfa transitions to match_char()

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

apparmor: convert duplicated dfa transitions to match_char()

For historical reasons several matchers duplicate the dfa character
transition instead of using match_char().

This is because aa_dfa_match_until() and aa_dfa_matchn_until() were
written on a branch that did not yet have match_char(), and copied code
from aa_dfa_match(). leftmatch_fb() used the same pattern.

When match_char() added support for diff-encoded states, the change was
never ported to these copies.

match_char() resolves a diff encoded state by using def[state] and
retrying the same character, until it reaches a state with a valid
transition. The copies instead do a simple `state = def[state];` after
the character is consumed, so on a diff encoded state one byte is dropped
and the walk continues from the diff parent in the wrong state.

This makes an unnamed px/Px/cx/Cx transition resolve to no profile, and
exec fails with

apparmor="DENIED" operation="exec" info="profile transition not found"

Convert the three copies to match_char(). For a dfa with no diff
encoded state this is a no-op.

This bug is latent until the kernel advertises policy/diff-encode.

Analysis

AI-generated

Technical impact

The flaw lies in AppArmor’s DFA transition handling, where duplicated transitions from older matchers bypass the newer match_char() logic. On diff‑encoded states this causes a character to be dropped and the walk to continue from an incorrect parent state, so the transition does not resolve to any profile. As a result, an exec operation that should normally be allowed ends with an apparmor=DENIED and the profile transition not found. The vulnerability is a logic error that leads to unintended denial of execution, rather than allowing elevated privileges.

Affected Systems

Linux kernel versions prior to the inclusion of the fix that converts duplicated DFA transitions to match_char(). The exact affected releases are not listed, but the issue only manifests when the kernel advertises policy/diff‑encoding support. All standard distributions compiling a recent AppArmor module are potentially vulnerable until the patch is applied.

Risk and Exploitability

The CVSS score and EPSS score are not provided, and the vulnerability is not listed in CISA’s KEV catalog. The attack vector appears local, requiring the execution of a binary governed by a reputable, diff‑encoded AppArmor profile. While the flaw does not grant privilege escalation, it can disrupt service by denying legitimate executions. The likelihood of exploitation is uncertain but non‑negligible because it depends on apps requiring the problematic profile transition. Keeping the system up‑to‑date or disabling diff‑encoding mitigates the risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a supported release that includes the patch converting duplicate DFA transitions to match_char()
  • Modify or temporarily disable AppArmor profiles that use diff‑encoded transitions until the kernel fix is applied
  • If immediate kernel upgrade is unavailable, block execution of affected binaries by applying a deny rule in AppArmor until a patch can be installed

Generated by OpenCVE AI on November 30, 2026 at 19:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-704
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: apparmor: convert duplicated dfa transitions to match_char() For historical reasons several matchers duplicate the dfa character transition instead of using match_char(). This is because aa_dfa_match_until() and aa_dfa_matchn_until() were written on a branch that did not yet have match_char(), and copied code from aa_dfa_match(). leftmatch_fb() used the same pattern. When match_char() added support for diff-encoded states, the change was never ported to these copies. match_char() resolves a diff encoded state by using def[state] and retrying the same character, until it reaches a state with a valid transition. The copies instead do a simple `state = def[state];` after the character is consumed, so on a diff encoded state one byte is dropped and the walk continues from the diff parent in the wrong state. This makes an unnamed px/Px/cx/Cx transition resolve to no profile, and exec fails with apparmor="DENIED" operation="exec" info="profile transition not found" Convert the three copies to match_char(). For a dfa with no diff encoded state this is a no-op. This bug is latent until the kernel advertises policy/diff-encode.
Title apparmor: convert duplicated dfa transitions to match_char()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-704

    Incorrect Type Conversion or Cast

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:31 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM