{"id":"CVE-2024-47675","state":"PUBLISHED","title":"bpf: Fix use-after-free in bpf_uprobe_multi_link_attach()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix use-after-free in bpf_uprobe_multi_link_attach()\n\nIf bpf_link_prime() fails, bpf_uprobe_multi_link_attach() goes to the\nerror_free label and frees the array of bpf_uprobe's without calling\nbpf_uprobe_unregister().\n\nThis leaks bpf_uprobe->uprobe and worse, this frees bpf_uprobe->consumer\nwithout removing it from the uprobe->consumers list.","publishedAt":"2024-10-21T11:53:19.762Z","updatedAt":"2026-08-05T11:39:21.879Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"89ae89f53d201143560f1e9ed4bfa62eee34f88e","status":"affected","lessThan":"790c630ab0e7d7aba6d186581d4627c09fce60f3","versionType":"git"},{"version":"89ae89f53d201143560f1e9ed4bfa62eee34f88e","status":"affected","lessThan":"7c1d782e5afbf7c50ba74ecc4ddc18a05d63e5ee","versionType":"git"},{"version":"89ae89f53d201143560f1e9ed4bfa62eee34f88e","status":"affected","lessThan":"cdf27834c3dd5d9abf7eb8e4ee87ee9e307eb25c","versionType":"git"},{"version":"89ae89f53d201143560f1e9ed4bfa62eee34f88e","status":"affected","lessThan":"5fe6e308abaea082c20fbf2aa5df8e14495622cf","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/trace/bpf_trace.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.54","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.13","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11.2","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/trace/bpf_trace.c"]}],"references":["https://git.kernel.org/stable/c/790c630ab0e7d7aba6d186581d4627c09fce60f3","https://git.kernel.org/stable/c/7c1d782e5afbf7c50ba74ecc4ddc18a05d63e5ee","https://git.kernel.org/stable/c/cdf27834c3dd5d9abf7eb8e4ee87ee9e307eb25c","https://git.kernel.org/stable/c/5fe6e308abaea082c20fbf2aa5df8e14495622cf"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/47xxx/CVE-2024-47675.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-47675","state":"PUBLISHED","datePublished":"2024-10-21T11:53:19.762Z","dateUpdated":"2026-08-05T11:39:21.879Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-09-30T16:00:12.937Z"},"containers":{"cna":{"title":"bpf: Fix use-after-free in bpf_uprobe_multi_link_attach()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix use-after-free in bpf_uprobe_multi_link_attach()\n\nIf bpf_link_prime() fails, bpf_uprobe_multi_link_attach() goes to the\nerror_free label and frees the array of bpf_uprobe's without calling\nbpf_uprobe_unregister().\n\nThis leaks bpf_uprobe->uprobe and worse, this frees bpf_uprobe->consumer\nwithout removing it from the uprobe->consumers list."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"89ae89f53d201143560f1e9ed4bfa62eee34f88e","status":"affected","lessThan":"790c630ab0e7d7aba6d186581d4627c09fce60f3","versionType":"git"},{"version":"89ae89f53d201143560f1e9ed4bfa62eee34f88e","status":"affected","lessThan":"7c1d782e5afbf7c50ba74ecc4ddc18a05d63e5ee","versionType":"git"},{"version":"89ae89f53d201143560f1e9ed4bfa62eee34f88e","status":"affected","lessThan":"cdf27834c3dd5d9abf7eb8e4ee87ee9e307eb25c","versionType":"git"},{"version":"89ae89f53d201143560f1e9ed4bfa62eee34f88e","status":"affected","lessThan":"5fe6e308abaea082c20fbf2aa5df8e14495622cf","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/trace/bpf_trace.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.54","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.13","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11.2","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/trace/bpf_trace.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/790c630ab0e7d7aba6d186581d4627c09fce60f3"},{"url":"https://git.kernel.org/stable/c/7c1d782e5afbf7c50ba74ecc4ddc18a05d63e5ee"},{"url":"https://git.kernel.org/stable/c/cdf27834c3dd5d9abf7eb8e4ee87ee9e307eb25c"},{"url":"https://git.kernel.org/stable/c/5fe6e308abaea082c20fbf2aa5df8e14495622cf"}],"metrics":[{"cvssV3_1":{"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"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached only through the local `bpf(BPF_LINK_CREATE)` syscall with a `BPF_TRACE_UPROBE_MULTI` attach type, and the freed memory is subsequently dereferenced by executing a local file. There is no remote or adjacent-network path into `bpf_uprobe_multi_link_attach()`.\nAC:L - The failing condition is `bpf_link_prime()` returning `-EMFILE` from `get_unused_fd_flags()`, which the attacker forces deterministically by exhausting or lowering `RLIMIT_NOFILE` before the call — no race and no uncontrolled state. The attacker also chooses the freed allocation size via `cnt` and triggers the dangling consumer at will by exec'ing their own uprobe'd binary.\nPR:L - Loading the `BPF_PROG_TYPE_KPROBE` program requires `CAP_BPF`+`CAP_PERFMON`, which is a restricted tracing capability set rather than full administrative control, and it is routinely delegated to unprivileged contexts via BPF tokens (bpffs `delegate_cmds`/`delegate_progs`) or granted to non-root observability/container workloads. Such a caller has no other authority over the kernel, so this is low privilege, not high.\nUI:N - The attacker performs every step themselves — attach the multi-uprobe link, force the `bpf_link_prime()` failure, spray the freed slab, then execute their own traced binary to hit the breakpoint. No victim action is required.\nS:U - The use-after-free corrupts kernel heap memory and hijacks kernel control flow within the same kernel security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed `struct bpf_uprobe` array is reclaimed by attacker-sprayed data and then used as a `struct uprobe_consumer` with attacker-controlled `handler`/`next`/`link` pointers, yielding arbitrary kernel-memory read via the resulting indirect calls and `bpf_prog_run()` dereferences. That is full disclosure of kernel memory.\nI:H - The dangling `uc->handler(uc, regs)` call in `handler_chain()` and the `prog->bpf_func()` dispatch reached through the freed `uprobe->link` give control-flow hijack from an attacker-sized, attacker-timed heap object, which is a standard route to arbitrary kernel write and privilege escalation.\nA:H - Even without exploitation, walking the freed consumer list on the next breakpoint hit dereferences poisoned or reused slab memory, producing a KASAN slab-use-after-free and a kernel oops/panic — exactly what syzbot reported. It can be re-triggered at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:39:21.879Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.6.54"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.10.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.11.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-47675","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-10-21T13:08:07.484678Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-21T13:14:17.530Z"}}]}}}