GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2026-74338 (GCVE-0-2026-74338)

Vulnerability from cvelistv5 – Published: 2026-08-15 05:58 – Updated: 2026-08-17 05:46
VLAI
Title
bpf: Reject sleepable BPF_LSM_CGROUP programs at load time
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.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e , < be9eaf2bb5db4ad3de61ef739fd268fd7f135737 (git)
Affected: 69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e , < 5b038319be442c620f774e6fc9e9283deeca1c75 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.0
Unaffected: 0 , < 6.0 (semver)
Unaffected: 7.1.5 , ≤ 7.1.* (semver)
Unaffected: 7.2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "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",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-74338",
      "date": "2026-09-05",
      "epss": "0.00128",
      "percentile": "0.02724"
    },
    "microsoft_vex": {
      "current_release_date": "2026-08-23T14:59:23.000Z",
      "cve": "CVE-2026-74338",
      "id": "msrc_CVE-2026-74338",
      "initial_release_date": "2026-08-23T14:59:23.000Z",
      "product_status:known_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "bpf: Reject sleepable BPF_LSM_CGROUP programs at load time",
      "url": "https://msrc.microsoft.com/csaf/vex/2026/msrc_cve-2026-74338.json",
      "version": "1"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-74338\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-08-15T06:22:34.740\",\"lastModified\":\"2026-08-17T06:19:28.243\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"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.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"kernel/bpf/verifier.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e\",\"lessThan\":\"be9eaf2bb5db4ad3de61ef739fd268fd7f135737\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e\",\"lessThan\":\"5b038319be442c620f774e6fc9e9283deeca1c75\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"kernel/bpf/verifier.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.0\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.0\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.1.5\",\"lessThanOrEqual\":\"7.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/5b038319be442c620f774e6fc9e9283deeca1c75\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/be9eaf2bb5db4ad3de61ef739fd268fd7f135737\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-08-19T13:21:50+00:00",
      "cve": "CVE-2026-74338",
      "id": "CVE-2026-74338",
      "initial_release_date": "2026-08-15T00:00:00+00:00",
      "product_status:known_affected": "184",
      "product_status:known_not_affected": "90",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: bpf: Reject sleepable BPF_LSM_CGROUP programs at load time",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-74338.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…