Skip to contentSkip to conversation

CVE-2026-23409: apparmor: fix differential encoding verification

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: fix differential encoding verification

Differential encoding allows loops to be created if it is abused. To prevent this the unpack should verify that a diff-encode chain terminates.

Unfortunately the differential encode verification had two bugs.

1. it conflated states that had gone through check and already been marked, with states that were currently being checked and marked. This means that loops in the current chain being verified are treated as a chain that has already been verified.

2. the order bailout on already checked states compared current chain check iterators j,k instead of using the outer loop iterator i. Meaning a step backwards in states in the current chain verification was being mistaken for moving to an already verified state.

Move to a double mark scheme where already verified states get a different mark, than the current chain being kept. This enables us to also drop the backwards verification check that was the cause of the second error as any already verified state is already marked.

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

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

	Issue introduced in 4.17 with commit 031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3 and fixed in 6.6.130 with commit f90e3ecd9e1ed69f1a370f866ceed1f104f3ab4a
	Issue introduced in 4.17 with commit 031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3 and fixed in 6.12.77 with commit 34fc60b125ed1d4eb002c76b0664bf0619492167
	Issue introduced in 4.17 with commit 031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3 and fixed in 6.18.18 with commit 623a9d211bbbb031bb1cbdb38b23487648167f8a
	Issue introduced in 4.17 with commit 031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3 and fixed in 6.19.8 with commit 1ff4857fac56ac5a90ee63b24db05fa5e91a45aa
	Issue introduced in 4.17 with commit 031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3 and fixed in 7.0-rc4 with commit 39440b137546a3aa383cfdabc605fb73811b6093

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-23409

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/include/match.h
security/apparmor/match.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/f90e3ecd9e1ed69f1a370f866ceed1f104f3ab4a
	https://git.kernel.org/stable/c/34fc60b125ed1d4eb002c76b0664bf0619492167
	https://git.kernel.org/stable/c/623a9d211bbbb031bb1cbdb38b23487648167f8a
	https://git.kernel.org/stable/c/1ff4857fac56ac5a90ee63b24db05fa5e91a45aa
	https://git.kernel.org/stable/c/39440b137546a3aa383cfdabc605fb73811b6093