{"id":"CVE-2026-139318","state":"PUBLISHED","title":"bpf: Read the probe of a perf event under event_mutex","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Read the probe of a perf event under event_mutex\n\nFor a perf event on a kprobe or uprobe event which was made in tracefs,\nbpf_get_kprobe_info() and bpf_get_uprobe_info() look the probe up by\nname in the list of dynamic events, and hand a pointer to its symbol or\nfile name back to the caller. None of the callers holds event_mutex.\n\nThe perf event keeps its trace event alive, nothing else. Other dynamic\nevents are removed from the list and freed during the walk. And a probe\nwhich shares its event with other probes can be deleted while the event\nis in use, so even the probe which is found can be freed, together with\nthe string, before the caller has measured and copied it. The result is\na use-after-free in the walk, in strlen() and in the copy to user space,\nor a NULL pointer dereference.\n\nThe readers are BPF_OBJ_GET_INFO_BY_FD and fdinfo of a perf link, for\nwhoever holds a descriptor of the link, and BPF_TASK_FD_QUERY. The other\nside is anybody who may write to dynamic_events, kprobe_events or\nuprobe_events.\n\nTake event_mutex in bpf_get_perf_event_info() and give the caller a copy\nof the name, which it has to free.","publishedAt":"2026-11-30T13:33:39.275Z","updatedAt":"2026-11-30T13:33:39.275Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"e1b668adaa02c6f45f0d68b466aacb854e6b473c","versionType":"git"},{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"f5d96a5f4aea1fcd9b4093f274715c052bf7715c","versionType":"git"},{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"fd3e7631fb502f6b51dc25e4724acc836683145d","versionType":"git"},{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"be367c0bf210854265cf6b6dcaf74c5ad632978c","versionType":"git"},{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"3ccd700543f16a2b2ab656f35dcaeb6bd7c45e22","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/syscall.c","kernel/trace/bpf_trace.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.18","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","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":["kernel/bpf/syscall.c","kernel/trace/bpf_trace.c"]}],"references":["https://git.kernel.org/stable/c/e1b668adaa02c6f45f0d68b466aacb854e6b473c","https://git.kernel.org/stable/c/f5d96a5f4aea1fcd9b4093f274715c052bf7715c","https://git.kernel.org/stable/c/fd3e7631fb502f6b51dc25e4724acc836683145d","https://git.kernel.org/stable/c/be367c0bf210854265cf6b6dcaf74c5ad632978c","https://git.kernel.org/stable/c/3ccd700543f16a2b2ab656f35dcaeb6bd7c45e22"],"weaknesses":[],"ingestedAt":"2026-11-30T13:46:04.484Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139318.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139318","state":"PUBLISHED","datePublished":"2026-11-30T13:33:39.275Z","dateUpdated":"2026-11-30T13:33:39.275Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.926Z"},"containers":{"cna":{"title":"bpf: Read the probe of a perf event under event_mutex","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Read the probe of a perf event under event_mutex\n\nFor a perf event on a kprobe or uprobe event which was made in tracefs,\nbpf_get_kprobe_info() and bpf_get_uprobe_info() look the probe up by\nname in the list of dynamic events, and hand a pointer to its symbol or\nfile name back to the caller. None of the callers holds event_mutex.\n\nThe perf event keeps its trace event alive, nothing else. Other dynamic\nevents are removed from the list and freed during the walk. And a probe\nwhich shares its event with other probes can be deleted while the event\nis in use, so even the probe which is found can be freed, together with\nthe string, before the caller has measured and copied it. The result is\na use-after-free in the walk, in strlen() and in the copy to user space,\nor a NULL pointer dereference.\n\nThe readers are BPF_OBJ_GET_INFO_BY_FD and fdinfo of a perf link, for\nwhoever holds a descriptor of the link, and BPF_TASK_FD_QUERY. The other\nside is anybody who may write to dynamic_events, kprobe_events or\nuprobe_events.\n\nTake event_mutex in bpf_get_perf_event_info() and give the caller a copy\nof the name, which it has to free."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"e1b668adaa02c6f45f0d68b466aacb854e6b473c","versionType":"git"},{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"f5d96a5f4aea1fcd9b4093f274715c052bf7715c","versionType":"git"},{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"fd3e7631fb502f6b51dc25e4724acc836683145d","versionType":"git"},{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"be367c0bf210854265cf6b6dcaf74c5ad632978c","versionType":"git"},{"version":"41bdc4b40ed6fb26c6acc655ed9a243a348709c9","status":"affected","lessThan":"3ccd700543f16a2b2ab656f35dcaeb6bd7c45e22","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/syscall.c","kernel/trace/bpf_trace.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.18","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","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":["kernel/bpf/syscall.c","kernel/trace/bpf_trace.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e1b668adaa02c6f45f0d68b466aacb854e6b473c"},{"url":"https://git.kernel.org/stable/c/f5d96a5f4aea1fcd9b4093f274715c052bf7715c"},{"url":"https://git.kernel.org/stable/c/fd3e7631fb502f6b51dc25e4724acc836683145d"},{"url":"https://git.kernel.org/stable/c/be367c0bf210854265cf6b6dcaf74c5ad632978c"},{"url":"https://git.kernel.org/stable/c/3ccd700543f16a2b2ab656f35dcaeb6bd7c45e22"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:33:39.275Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}