{"id":"CVE-2026-139606","state":"PUBLISHED","title":"bpf: Leave out the hidden exit edge of a subprogram without an exit","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Leave out the hidden exit edge of a subprogram without an exit\n\nvisit_abnormal_return_insn() gives tail_call and ld_{abs,ind} insns a\nsecond successor, the exit_idx of their subprogram, so that the hidden\nexit from the subprogram is part of the CFG. check_subprogs() only\nassigns exit_idx when it walks over a BPF_EXIT, and a subprogram whose\nlast insn jumps back into itself never has one, so exit_idx stays zero\nand the edge points at insn 0 of the program:\n\n  0: r0 = 0\n  1: r0 = *(u8 *)skb[0]\n  2: goto -2\n\nFor a subprogram other than main, update_insn() then reads the liveness\nmasks at a negative relative index. Such a subprogram can still load\nwhen it leaves through a bpf_throw(), so mark exit_idx as unset in that\ncase and leave the hidden edge out, as there is no exit for it to reach.","publishedAt":"2026-11-30T13:36:18.368Z","updatedAt":"2026-11-30T13:36:18.368Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e40f5a6bf88a781d5f81bc6b8aab9ac31d8c98dd","status":"affected","lessThan":"046cdb35953063b5d38fa7de541c0bb86011feb2","versionType":"git"},{"version":"e40f5a6bf88a781d5f81bc6b8aab9ac31d8c98dd","status":"affected","lessThan":"939bb6270ee32cfef0631b30ff07a9e0b8806e64","versionType":"git"},{"version":"928d354ae3557e8f755a227e67be88034eb3cd7f","status":"affected","versionType":"git"},{"version":"8a800497d9f6c2ec9c2c1ba7b71d0ac2ea7f7bbe","status":"affected","versionType":"git"},{"version":"de1055e7f9e67af32b1f3376066272b04e5223c0","status":"affected","versionType":"git"},{"version":"37ad2bb11e9de92cb7b94548705eeedd87f7d392","status":"affected","versionType":"git"},{"version":"8674e2db06cff6b50f2216eed9a761d15425bb34","status":"affected","versionType":"git"},{"version":"ce01a4e5cfac7adbe0be565f90cd32ecbb2f8337","status":"affected","versionType":"git"},{"version":"5.10.265","status":"affected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.216","status":"affected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.183","status":"affected","lessThan":"6.2","versionType":"semver"},{"version":"6.6.148","status":"affected","lessThan":"6.7","versionType":"semver"},{"version":"6.12.101","status":"affected","lessThan":"6.13","versionType":"semver"},{"version":"6.18.42","status":"affected","lessThan":"6.19","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_verifier.h","kernel/bpf/cfg.c","kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.19","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/bpf_verifier.h","kernel/bpf/cfg.c","kernel/bpf/verifier.c"]}],"references":["https://git.kernel.org/stable/c/046cdb35953063b5d38fa7de541c0bb86011feb2","https://git.kernel.org/stable/c/939bb6270ee32cfef0631b30ff07a9e0b8806e64"],"weaknesses":[],"ingestedAt":"2026-11-30T13:52:04.503Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139606.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139606","state":"PUBLISHED","datePublished":"2026-11-30T13:36:18.368Z","dateUpdated":"2026-11-30T13:36:18.368Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.943Z"},"containers":{"cna":{"title":"bpf: Leave out the hidden exit edge of a subprogram without an exit","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Leave out the hidden exit edge of a subprogram without an exit\n\nvisit_abnormal_return_insn() gives tail_call and ld_{abs,ind} insns a\nsecond successor, the exit_idx of their subprogram, so that the hidden\nexit from the subprogram is part of the CFG. check_subprogs() only\nassigns exit_idx when it walks over a BPF_EXIT, and a subprogram whose\nlast insn jumps back into itself never has one, so exit_idx stays zero\nand the edge points at insn 0 of the program:\n\n  0: r0 = 0\n  1: r0 = *(u8 *)skb[0]\n  2: goto -2\n\nFor a subprogram other than main, update_insn() then reads the liveness\nmasks at a negative relative index. Such a subprogram can still load\nwhen it leaves through a bpf_throw(), so mark exit_idx as unset in that\ncase and leave the hidden edge out, as there is no exit for it to reach."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e40f5a6bf88a781d5f81bc6b8aab9ac31d8c98dd","status":"affected","lessThan":"046cdb35953063b5d38fa7de541c0bb86011feb2","versionType":"git"},{"version":"e40f5a6bf88a781d5f81bc6b8aab9ac31d8c98dd","status":"affected","lessThan":"939bb6270ee32cfef0631b30ff07a9e0b8806e64","versionType":"git"},{"version":"928d354ae3557e8f755a227e67be88034eb3cd7f","status":"affected","versionType":"git"},{"version":"8a800497d9f6c2ec9c2c1ba7b71d0ac2ea7f7bbe","status":"affected","versionType":"git"},{"version":"de1055e7f9e67af32b1f3376066272b04e5223c0","status":"affected","versionType":"git"},{"version":"37ad2bb11e9de92cb7b94548705eeedd87f7d392","status":"affected","versionType":"git"},{"version":"8674e2db06cff6b50f2216eed9a761d15425bb34","status":"affected","versionType":"git"},{"version":"ce01a4e5cfac7adbe0be565f90cd32ecbb2f8337","status":"affected","versionType":"git"},{"version":"5.10.265","status":"affected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.216","status":"affected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.183","status":"affected","lessThan":"6.2","versionType":"semver"},{"version":"6.6.148","status":"affected","lessThan":"6.7","versionType":"semver"},{"version":"6.12.101","status":"affected","lessThan":"6.13","versionType":"semver"},{"version":"6.18.42","status":"affected","lessThan":"6.19","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/bpf_verifier.h","kernel/bpf/cfg.c","kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.19","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/bpf_verifier.h","kernel/bpf/cfg.c","kernel/bpf/verifier.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/046cdb35953063b5d38fa7de541c0bb86011feb2"},{"url":"https://git.kernel.org/stable/c/939bb6270ee32cfef0631b30ff07a9e0b8806e64"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:36:18.368Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.4-rc1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.265"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.216"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.183"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.148"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.101"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18.42"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}