Skip to contentSkip to conversation

CVE-2026-23404: apparmor: replace recursive profile removal with iterative approach

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 1

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

apparmor: replace recursive profile removal with iterative approach

The profile removal code uses recursion when removing nested profiles, which can lead to kernel stack exhaustion and system crashes.

Reproducer:

  $ pf='a'; for ((i=0; i<1024; i++)); do
      echo -e "profile $pf { \n }" | apparmor_parser -K -a;
      pf="$pf//x";
  done
  $ echo -n a > /sys/kernel/security/apparmor/.remove

Replace the recursive __aa_profile_list_release() approach with an iterative approach in __remove_profile(). The function repeatedly finds and removes leaf profiles until the entire subtree is removed, maintaining the same removal semantic without recursion.

The Linux kernel CVE team has assigned CVE-2026-23404 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.36 with commit c88d4c7b049e87998ac0a9f455aa545cc895ef92 and fixed in 6.6.130 with commit 33959a491e9fd557abfa5fce5ae4637d400915d3
	Issue introduced in 2.6.36 with commit c88d4c7b049e87998ac0a9f455aa545cc895ef92 and fixed in 6.12.77 with commit 999bd704b0b641527a5ed46f0d969deff8cfa68b
	Issue introduced in 2.6.36 with commit c88d4c7b049e87998ac0a9f455aa545cc895ef92 and fixed in 6.18.18 with commit 7eade846e013cbe8d2dc4a484463aa19e6515c7f
	Issue introduced in 2.6.36 with commit c88d4c7b049e87998ac0a9f455aa545cc895ef92 and fixed in 6.19.8 with commit a6a941a1294ac5abe22053dc501d25aed96e48fe
	Issue introduced in 2.6.36 with commit c88d4c7b049e87998ac0a9f455aa545cc895ef92 and fixed in 7.0-rc4 with commit ab09264660f9de5d05d1ef4e225aa447c63a8747

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-23404

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
security/apparmor/policy.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/33959a491e9fd557abfa5fce5ae4637d400915d3
	https://git.kernel.org/stable/c/999bd704b0b641527a5ed46f0d969deff8cfa68b
	https://git.kernel.org/stable/c/7eade846e013cbe8d2dc4a484463aa19e6515c7f
	https://git.kernel.org/stable/c/a6a941a1294ac5abe22053dc501d25aed96e48fe
	https://git.kernel.org/stable/c/ab09264660f9de5d05d1ef4e225aa447c63a8747