{"id":"CVE-2026-139444","state":"PUBLISHED","title":"bpf: Reject BTF ids with the same address in tracing_multi link","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject BTF ids with the same address in tracing_multi link\n\ncheck_dup_ids() rejects equal BTF ids, but different ids can resolve to\nthe same address. Aliases:\n\n  ffffffff8161b6b0 t __do_sys_munlockall\n  ffffffff8161b6b0 T __ia32_sys_munlockall\n  ffffffff8161b6b0 T __x64_sys_munlockall\n\nor several BTF_KIND_FUNC with the same name that vmlinux BTF has when\nCONFIG_DEBUG_INFO_BTF_INLINE is set.\n\nEach id gets its own trampoline and register_fentry_multi() adds them to\ndata->reg with the same ip. update_ftrace_direct_add() checks that new\nentries are not in direct_functions, but doesn't compare them with each\nother, so the attach succeeds. At detach update_ftrace_direct_del() sees\nthat 'direct' of one of the entries doesn't match and returns -EINVAL:\n\n  WARNING: kernel/bpf/trampoline.c:1845 at bpf_trampoline_multi_detach+0x24c/0x280\n  Call Trace:\n   bpf_link_free+0x51/0x110\n   bpf_link_release+0x18/0x20\n   __fput+0x103/0x2d0\n   __x64_sys_close+0x3d/0x80\n\nThe images are freed anyway, while ftrace still calls them:\n\n  Oops: int3: 0000 [#1] SMP NOPTI\n  RIP: 0010:0xffffffffc042b201\n  Call Trace:\n   ? __audit_syscall_exit+0x9/0x100\n   ? do_syscall_64+0x5ab/0x5e0\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n  Kernel panic - not syncing: Fatal exception in interrupt\n\nReturn -EINVAL from register_fentry_multi() when ip is already in\ndata->reg. When such ids are attached via different links the second\nattach already fails with -EINVAL in update_ftrace_direct_add().\n\nMove the declaration of ftrace_lookup_ip() to include/linux/ftrace.h.\n\nThe lookup adds 60 msec to the attach of 64480 functions in\ntracing_multi_bench_attach: 1.34 -> 1.40 sec.","publishedAt":"2026-11-30T13:34:48.743Z","updatedAt":"2026-11-30T13:34:48.743Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"aef4dfa790b22d8052cfb78044eadbe03c876c39","status":"affected","lessThan":"6573d2f1de8a72bc2311ecf3a679d4c15e94748b","versionType":"git"},{"version":"aef4dfa790b22d8052cfb78044eadbe03c876c39","status":"affected","lessThan":"87bfa22937000db29a9a09ec826ab7227eaf9e8c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/ftrace.h","kernel/bpf/trampoline.c","kernel/trace/trace.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.2","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/ftrace.h","kernel/bpf/trampoline.c","kernel/trace/trace.h"]}],"references":["https://git.kernel.org/stable/c/6573d2f1de8a72bc2311ecf3a679d4c15e94748b","https://git.kernel.org/stable/c/87bfa22937000db29a9a09ec826ab7227eaf9e8c"],"weaknesses":[],"ingestedAt":"2026-11-30T13:50:04.417Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139444.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139444","state":"PUBLISHED","datePublished":"2026-11-30T13:34:48.743Z","dateUpdated":"2026-11-30T13:34:48.743Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.934Z"},"containers":{"cna":{"title":"bpf: Reject BTF ids with the same address in tracing_multi link","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Reject BTF ids with the same address in tracing_multi link\n\ncheck_dup_ids() rejects equal BTF ids, but different ids can resolve to\nthe same address. Aliases:\n\n  ffffffff8161b6b0 t __do_sys_munlockall\n  ffffffff8161b6b0 T __ia32_sys_munlockall\n  ffffffff8161b6b0 T __x64_sys_munlockall\n\nor several BTF_KIND_FUNC with the same name that vmlinux BTF has when\nCONFIG_DEBUG_INFO_BTF_INLINE is set.\n\nEach id gets its own trampoline and register_fentry_multi() adds them to\ndata->reg with the same ip. update_ftrace_direct_add() checks that new\nentries are not in direct_functions, but doesn't compare them with each\nother, so the attach succeeds. At detach update_ftrace_direct_del() sees\nthat 'direct' of one of the entries doesn't match and returns -EINVAL:\n\n  WARNING: kernel/bpf/trampoline.c:1845 at bpf_trampoline_multi_detach+0x24c/0x280\n  Call Trace:\n   bpf_link_free+0x51/0x110\n   bpf_link_release+0x18/0x20\n   __fput+0x103/0x2d0\n   __x64_sys_close+0x3d/0x80\n\nThe images are freed anyway, while ftrace still calls them:\n\n  Oops: int3: 0000 [#1] SMP NOPTI\n  RIP: 0010:0xffffffffc042b201\n  Call Trace:\n   ? __audit_syscall_exit+0x9/0x100\n   ? do_syscall_64+0x5ab/0x5e0\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n  Kernel panic - not syncing: Fatal exception in interrupt\n\nReturn -EINVAL from register_fentry_multi() when ip is already in\ndata->reg. When such ids are attached via different links the second\nattach already fails with -EINVAL in update_ftrace_direct_add().\n\nMove the declaration of ftrace_lookup_ip() to include/linux/ftrace.h.\n\nThe lookup adds 60 msec to the attach of 64480 functions in\ntracing_multi_bench_attach: 1.34 -> 1.40 sec."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"aef4dfa790b22d8052cfb78044eadbe03c876c39","status":"affected","lessThan":"6573d2f1de8a72bc2311ecf3a679d4c15e94748b","versionType":"git"},{"version":"aef4dfa790b22d8052cfb78044eadbe03c876c39","status":"affected","lessThan":"87bfa22937000db29a9a09ec826ab7227eaf9e8c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/ftrace.h","kernel/bpf/trampoline.c","kernel/trace/trace.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.2","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/ftrace.h","kernel/bpf/trampoline.c","kernel/trace/trace.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/6573d2f1de8a72bc2311ecf3a679d4c15e94748b"},{"url":"https://git.kernel.org/stable/c/87bfa22937000db29a9a09ec826ab7227eaf9e8c"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:34:48.743Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}