CVE-2026-74338 (GCVE-0-2026-74338)
Vulnerability from cvelistv5
Published
2026-08-15 05:58
Modified
2026-08-17 05:46
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
bpf: Reject sleepable BPF_LSM_CGROUP programs at load time
The cgroup shim runs under rcu_read_lock_dont_migrate(), so we should
not attach any sleepable BPF programs there. Add support to the verifier
to explicitly reject attempts to load sleepable BPF programs destined
for LSM cgroup attachment.
Without this, we get the following splat from a BPF_LSM_CGROUP
program marked BPF_F_SLEEPABLE attached to file_open when it calls
bpf_get_dentry_xattr():
BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1567
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 34317, name: load
preempt_count: 0, expected: 0
RCU nest depth: 2, expected: 0
Call Trace:
down_read+0x76/0x480
ext4_xattr_get+0x11f/0x700
__vfs_getxattr+0xf0/0x150
bpf_get_dentry_xattr+0xbb/0xf0
bpf_prog_e76a298dac9218c6_test_open+0x6a/0x85
__cgroup_bpf_run_lsm_current+0x326/0x840
bpf_trampoline_6442534646+0x62/0x14d
security_file_open+0x34/0x60
do_dentry_open+0x340/0x1260
vfs_open+0x7a/0x440
path_openat+0x1bac/0x30a0
libbpf provides a .s named section variant for every sleepable
program type except lsm_cgroup, reflecting that per-cgroup LSM programs
are intended to only run in a non-sleepable context.
The above splat was obtained by bypassing libbpf by using bpf(2)
directly.
References
Impacted products
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"kernel/bpf/verifier.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "be9eaf2bb5db4ad3de61ef739fd268fd7f135737",
"status": "affected",
"version": "69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e",
"versionType": "git"
},
{
"lessThan": "5b038319be442c620f774e6fc9e9283deeca1c75",
"status": "affected",
"version": "69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"kernel/bpf/verifier.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "6.0"
},
{
"lessThan": "6.0",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "7.1.*",
"status": "unaffected",
"version": "7.1.5",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "7.2",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "7.1.5",
"versionStartIncluding": "6.0",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "7.2",
"versionStartIncluding": "6.0",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject sleepable BPF_LSM_CGROUP programs at load time\n\nThe cgroup shim runs under rcu_read_lock_dont_migrate(), so we should\nnot attach any sleepable BPF programs there. Add support to the verifier\nto explicitly reject attempts to load sleepable BPF programs destined\nfor LSM cgroup attachment.\n\nWithout this, we get the following splat from a BPF_LSM_CGROUP\nprogram marked BPF_F_SLEEPABLE attached to file_open when it calls\nbpf_get_dentry_xattr():\n\n BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1567\n in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 34317, name: load\n preempt_count: 0, expected: 0\n RCU nest depth: 2, expected: 0\n Call Trace:\n down_read+0x76/0x480\n ext4_xattr_get+0x11f/0x700\n __vfs_getxattr+0xf0/0x150\n bpf_get_dentry_xattr+0xbb/0xf0\n bpf_prog_e76a298dac9218c6_test_open+0x6a/0x85\n __cgroup_bpf_run_lsm_current+0x326/0x840\n bpf_trampoline_6442534646+0x62/0x14d\n security_file_open+0x34/0x60\n do_dentry_open+0x340/0x1260\n vfs_open+0x7a/0x440\n path_openat+0x1bac/0x30a0\n\nlibbpf provides a .s named section variant for every sleepable\nprogram type except lsm_cgroup, reflecting that per-cgroup LSM programs\nare intended to only run in a non-sleepable context.\n\nThe above splat was obtained by bypassing libbpf by using bpf(2)\ndirectly."
}
],
"metrics": [
{
"cvssV3_1": {
"baseScore": 7.8,
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"scenarios": [
{
"lang": "en",
"value": "AV:L - Exploitation requires bpf(2) to load/attach a BPF_LSM_CGROUP program and a local file open to hit security_file_open; BPF/cgroup control is syscall-local, not reachable from remote network protocols.\nAC:L - On kernels with CONFIG_BPF_LSM and CONFIG_CGROUP_BPF, an attacker with BPF privileges can deterministically load BPF_F_SLEEPABLE BPF_LSM_CGROUP on file_open and trigger it with their own open(), without races or external preconditions.\nPR:L - Loading BPF_PROG_TYPE_LSM requires CAP_BPF and CAP_PERFMON, and attaching to a cgroup2 fd requires cgroup write access; both are obtainable by an unprivileged user via user namespaces (unshare -Urn) per kernel CVSS guidance.\nUI:N - No victim interaction is required; once the sleepable BPF_LSM_CGROUP program is attached, any file open in that cgroup automatically invokes the vulnerable non-sleepable cgroup LSM shim path.\nS:U - Impact stays within kernel security authority (kernel panic/hang or memory corruption from invalid-context sleeping); it is not a VM escape, IOMMU bypass, or cross-authority sandbox breakout.\nC:H - Calling sleepable helpers like bpf_get_dentry_xattr from rcu_read_lock_dont_migrate() can sleep on inode rwsems while RCU references remain, enabling use-after-free and arbitrary kernel memory disclosure beyond the intended xattr read.\nI:H - Sleeping in the cgroup BPF LSM RCU-critical section can corrupt VFS/inode lifetime and lock state, plausibly yielding arbitrary kernel write or control-flow hijack primitives, not merely a contained helper failure.\nA:H - The bug triggers \"BUG: sleeping function called from invalid context\" (demonstrated on file_open) and can also cause RCU stalls, deadlocks, oops, or kernel panic when production kernels actually block in down_read under RCU."
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-17T05:46:05.052Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/be9eaf2bb5db4ad3de61ef739fd268fd7f135737"
},
{
"url": "https://git.kernel.org/stable/c/5b038319be442c620f774e6fc9e9283deeca1c75"
}
],
"title": "bpf: Reject sleepable BPF_LSM_CGROUP programs at load time",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2026-74338",
"datePublished": "2026-08-15T05:58:29.222Z",
"dateReserved": "2026-08-15T05:44:03.885Z",
"dateUpdated": "2026-08-17T05:46:05.052Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…