Skip to contentSkip to conversation

CVE-2026-46057: landlock: Fix LOG_SUBDOMAINS_OFF inheritance across fork()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

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

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

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

landlock: Fix LOG_SUBDOMAINS_OFF inheritance across fork()

hook_cred_transfer() only copies the Landlock security blob when the source credential has a domain. This is inconsistent with landlock_restrict_self() which can set LOG_SUBDOMAINS_OFF on a credential without creating a domain (via the ruleset_fd=-1 path): the field is committed but not preserved across fork() because the child's prepare_creds() calls hook_cred_transfer() which skips the copy when domain is NULL.

This breaks the documented use case where a process mutes subdomain logs before forking sandboxed children: the children lose the muting and their domains produce unexpected audit records.

Fix this by unconditionally copying the Landlock credential blob.

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

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

	Issue introduced in 6.15 with commit ead9079f75696a028aea8860787770c80eddb8f9 and fixed in 6.18.27 with commit 2fcde49092aac55d5beef43fdd3633217672f7d1
	Issue introduced in 6.15 with commit ead9079f75696a028aea8860787770c80eddb8f9 and fixed in 7.0.4 with commit 1c513b8a00df13d231021e74ad92babb3fedf64a
	Issue introduced in 6.15 with commit ead9079f75696a028aea8860787770c80eddb8f9 and fixed in 7.1-rc1 with commit 874c8f83826c95c62c21d9edfe9ef43e5c346724

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

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/landlock/cred.c tools/testing/selftests/landlock/audit_test.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/2fcde49092aac55d5beef43fdd3633217672f7d1
	https://git.kernel.org/stable/c/1c513b8a00df13d231021e74ad92babb3fedf64a
	https://git.kernel.org/stable/c/874c8f83826c95c62c21d9edfe9ef43e5c346724