{"id":"CVE-2026-93112","state":"PUBLISHED","title":"bpf: Require a BPF cpumask for bpf_cpumask_populate()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Require a BPF cpumask for bpf_cpumask_populate()\n\nbpf_cpumask_populate() writes to its destination with bitmap_copy(), but\nthe destination is typed as struct cpumask *. That allows the verifier to\naccept borrowed cpumask pointers returned by read-only kfuncs, such as\nscx_bpf_get_online_cpumask(), as a writable destination.\n\nMake the destination a struct bpf_cpumask * so populate follows the same\nownership rule as the other mutating cpumask kfuncs. Query kfuncs continue\nto accept const struct cpumask * inputs.","publishedAt":"2026-09-17T16:11:21.122Z","updatedAt":"2026-10-19T09:05:45.809Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"950ad93df2fce70445e655ed2e74f5c1a8653ab2","status":"affected","lessThan":"0cfc9348a045da64955af2dd6902e66dfc7d6469","versionType":"git"},{"version":"950ad93df2fce70445e655ed2e74f5c1a8653ab2","status":"affected","lessThan":"b7e2a5c6519adc73be55c3de2cb545e095a0fbc5","versionType":"git"},{"version":"950ad93df2fce70445e655ed2e74f5c1a8653ab2","status":"affected","lessThan":"8740156ad33be5071b588b594c55f279457f667c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cpumask.c","tools/sched_ext/include/scx/compat.bpf.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.18.52","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.6","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cpumask.c","tools/sched_ext/include/scx/compat.bpf.h"]}],"references":["https://git.kernel.org/stable/c/0cfc9348a045da64955af2dd6902e66dfc7d6469","https://git.kernel.org/stable/c/b7e2a5c6519adc73be55c3de2cb545e095a0fbc5","https://git.kernel.org/stable/c/8740156ad33be5071b588b594c55f279457f667c"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:34.582Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/93xxx/CVE-2026-93112.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-93112","state":"PUBLISHED","datePublished":"2026-09-17T16:11:21.122Z","dateUpdated":"2026-10-19T09:05:45.809Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-17T16:02:15.086Z"},"containers":{"cna":{"title":"bpf: Require a BPF cpumask for bpf_cpumask_populate()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Require a BPF cpumask for bpf_cpumask_populate()\n\nbpf_cpumask_populate() writes to its destination with bitmap_copy(), but\nthe destination is typed as struct cpumask *. That allows the verifier to\naccept borrowed cpumask pointers returned by read-only kfuncs, such as\nscx_bpf_get_online_cpumask(), as a writable destination.\n\nMake the destination a struct bpf_cpumask * so populate follows the same\nownership rule as the other mutating cpumask kfuncs. Query kfuncs continue\nto accept const struct cpumask * inputs."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"950ad93df2fce70445e655ed2e74f5c1a8653ab2","status":"affected","lessThan":"0cfc9348a045da64955af2dd6902e66dfc7d6469","versionType":"git"},{"version":"950ad93df2fce70445e655ed2e74f5c1a8653ab2","status":"affected","lessThan":"b7e2a5c6519adc73be55c3de2cb545e095a0fbc5","versionType":"git"},{"version":"950ad93df2fce70445e655ed2e74f5c1a8653ab2","status":"affected","lessThan":"8740156ad33be5071b588b594c55f279457f667c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cpumask.c","tools/sched_ext/include/scx/compat.bpf.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.18.52","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.6","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cpumask.c","tools/sched_ext/include/scx/compat.bpf.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/0cfc9348a045da64955af2dd6902e66dfc7d6469"},{"url":"https://git.kernel.org/stable/c/b7e2a5c6519adc73be55c3de2cb545e095a0fbc5"},{"url":"https://git.kernel.org/stable/c/8740156ad33be5071b588b594c55f279457f667c"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - bpf_cpumask_populate() is a kfunc on BPF_PROG_TYPE_SYSCALL/TRACING/STRUCT_OPS programs loaded via bpf(BPF_PROG_LOAD); the src bitmap is program-local memory, and a SYSCALL program runs it through BPF_PROG_TEST_RUN (bpf_prog_test_run_syscall). Those bits do not arrive in a network protocol message.\nAC:L - A program can call scx_bpf_get_online_cpumask() then bpf_cpumask_populate() in one path; process_kf_arg_ptr_to_btf_id() does not require strict matching here, so the borrowed struct cpumask * is accepted and bitmap_copy() runs with no race or layout dependency.\nPR:L - bpf_prog_load() of BPF_PROG_TYPE_SYSCALL needs only bpf_token_capable(CAP_BPF) (SYSCALL is not in is_perfmon_prog_type); TRACING/STRUCT_OPS also need CAP_PERFMON. bpf_token_capable() checks token->userns, so a delegated BPF token grants this to userns root rather than init-namespace root.\nUI:N - The attacker loads their own program and either BPF_PROG_TEST_RUN it or fork() to fire their tp_btf/task_newtask hook; no other user must mount, open a file, or otherwise interact.\nS:U - bitmap_copy() overwrites host kernel objects (__cpu_online_mask from scx_bpf_get_online_cpumask(), or task_struct.cpus_mask via cpus_ptr) in the same kernel; this is not a KVM/Xen escape or IOMMU bypass.\nC:N - bpf_cpumask_populate() only bitmap_copy()s the caller-supplied src buffer into the destination mask; it does not read kernel memory back to the program or otherwise disclose confidential data.\nI:H - The destination was typed struct cpumask * rather than struct bpf_cpumask *, so bitmap_copy() writes attacker-controlled bits into borrowed kernel masks such as cpu_online_mask from scx_bpf_get_online_cpumask() or task->cpus_ptr, which bpf_cpumask_set_cpu() would reject.\nA:H - Overwriting writable __cpu_online_mask forges the set walked by for_each_online_cpu(), so the scheduler IPIs or indexes per-CPU state for offline CPUs or sees num_online_cpus()==0, causing a kernel oops or hang."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-19T09:05:45.809Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.18.52"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.2.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}