Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-74342

published

kernfs: link kn to its parent before the LSM init hook

Published
15 Aug 2026, 05:58:31 UTC
Updated
17 Aug 2026, 05:17:34 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 319b82e8b46edaf557436ad858e734e583f78ec9 · 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 6cccc49b027c7551ffc1d2532f2ef1922661f3da · 0 to < 7.1.5 · Other versions: unaffected Affected Not stated Linux
Linux — Linux7.1.5 through 7.1.* · 7.2 and later · Other versions: affected Unaffected Not stated Linux
Amazon Linux AL2 Release evaluation No Fix Planned Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluation No Fix Planned Not stated Amazon Linux assessment

Description

In the Linux kernel, the following vulnerability has been resolved: kernfs: link kn to its parent before the LSM init hook After commit 12e9e3cd03b5 ("simpe_xattr: use per-sb cache"), kernfs_xattr_set() and kernfs_xattr_get() compute the cache via kernfs_root(kn) before any other check. kernfs_root(kn) walks kn->__parent first and falls back to kn->dir.root, both of which are NULL on a freshly kmem_cache_zalloc()'d kn. kn->__parent was being set in kernfs_new_node() after __kernfs_new_node() returned, and kn->dir.root is set even later by kernfs_create_dir_ns() / kernfs_create_empty_dir(). The LSM kernfs_init_security hook is invoked from inside __kernfs_new_node(), before either field has been initialized. selinux_kernfs_init_security() ends with kernfs_xattr_set(kn, XATTR_NAME_SELINUX, ...). kernfs_root(kn) then returns NULL, and &((struct kernfs_root *)NULL)->xa_cache evaluates to offsetof(struct kernfs_root, xa_cache) which faults: BUG: kernel NULL pointer dereference, address: 00000000000000e0 RIP: 0010:simple_xattr_set+0x27/0x8b0 Call Trace: kernfs_xattr_set+0x63/0xb0 selinux_kernfs_init_security+0x13b/0x270 security_kernfs_init_security+0x36/0xc0 __kernfs_new_node+0x182/0x290 kernfs_new_node+0x80/0xc0 kernfs_create_dir_ns+0x2b/0xa0 cgroup_create+0x116/0x380 cgroup_mkdir+0x7c/0x1a0 Reproduces deterministically at PID 1 (systemd) on an SELinux-enabled distro. The first cgroup mkdir under /sys/fs/cgroup with a labelled parent panics the kernel. The LSM hook's contract is that the kn_dir argument is the parent of the new kn, so kn->__parent should already point at kn_dir when the hook runs. Move kernfs_get(parent) and rcu_assign_pointer of kn->__parent from kernfs_new_node() into __kernfs_new_node() right before the security hook, and unwind the parent reference on the err_out4 path. kernfs_root(kn) then takes its parent branch during the hook and returns parent->dir.root, which is the correct root. This also closes the same-shape latent bug in kernfs_xattr_get() (which today is hidden only by kernfs_iattrs_noalloc() returning NULL on a fresh kn).

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

No normalized assessments.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 319b82e8b46edaf557436ad858e734e583f78ec9 (affected · git)1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 6cccc49b027c7551ffc1d2532f2ef1922661f3da (affected · git)0 to < 7.1.5 (affected · semver)Default: unaffected Linux · cna
Linux Linux 7.1.5 through 7.1.* (unaffected · semver)7.2 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

2

Provider assertions

1

Linux · cna

kernfs: link kn to its parent before the LSM init hook

Provenance

Schema
5.2
Searchable
yes
Content hash
b0982d006e22e38f5bfaee2a66a961bec8272491e9127cc1e429f2cb5eae18e5
Ingested
23 Sep 2026, 09:31:05 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected