{"id":"CVE-2026-139624","state":"PUBLISHED","title":"bpf, x86: Fix timed may_goto with private stack","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, x86: Fix timed may_goto with private stack\n\narch_bpf_timed_may_goto() computes the address of count and timestamp\nas rbp + offset. When the prog uses private stack the JIT maps r10 to r9\nand nothing is reserved under rbp, so bpf_check_timed_may_goto() reads\nand writes the timestamp in the kernel stack, where\narch_bpf_timed_may_goto() has just saved r0-r5 or further down.\nThe following loop in fentry prog with r0-r5 set to zero:\n\n  1: may_goto +2\n     r6 += 1\n     goto 1b\n\nleaves r3 with ktime in it when the prog has 64 bytes of stack and\nends after 65535 iterations when it has 128.\n\nAdd the frame pointer to the offset in the JIT, where rbp vs r9 is\nknown, and pass the pointer in AX.\n\narm64 and powerpc JITs keep the address of private stack in BPF_REG_FP\nand are not affected.","publishedAt":"2026-11-30T13:36:28.261Z","updatedAt":"2026-11-30T13:36:28.261Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2fb761823eadf2fdfb6fdf146c4b94807b4bc3ba","status":"affected","lessThan":"1545deb8c5266812cfb4f355fbdb8436bbae83bb","versionType":"git"},{"version":"2fb761823eadf2fdfb6fdf146c4b94807b4bc3ba","status":"affected","lessThan":"f430d4a1c8c631a5f264f5d9df41bfe859155679","versionType":"git"},{"version":"2fb761823eadf2fdfb6fdf146c4b94807b4bc3ba","status":"affected","lessThan":"bb83425b3cdcb7bb3c629598a4d5efad9cc80733","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/net/bpf_jit_comp.c","arch/x86/net/bpf_timed_may_goto.S"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.18.66","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":["arch/x86/net/bpf_jit_comp.c","arch/x86/net/bpf_timed_may_goto.S"]}],"references":["https://git.kernel.org/stable/c/1545deb8c5266812cfb4f355fbdb8436bbae83bb","https://git.kernel.org/stable/c/f430d4a1c8c631a5f264f5d9df41bfe859155679","https://git.kernel.org/stable/c/bb83425b3cdcb7bb3c629598a4d5efad9cc80733"],"weaknesses":[],"ingestedAt":"2026-11-30T13:52:04.503Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139624.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139624","state":"PUBLISHED","datePublished":"2026-11-30T13:36:28.261Z","dateUpdated":"2026-11-30T13:36:28.261Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.944Z"},"containers":{"cna":{"title":"bpf, x86: Fix timed may_goto with private stack","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, x86: Fix timed may_goto with private stack\n\narch_bpf_timed_may_goto() computes the address of count and timestamp\nas rbp + offset. When the prog uses private stack the JIT maps r10 to r9\nand nothing is reserved under rbp, so bpf_check_timed_may_goto() reads\nand writes the timestamp in the kernel stack, where\narch_bpf_timed_may_goto() has just saved r0-r5 or further down.\nThe following loop in fentry prog with r0-r5 set to zero:\n\n  1: may_goto +2\n     r6 += 1\n     goto 1b\n\nleaves r3 with ktime in it when the prog has 64 bytes of stack and\nends after 65535 iterations when it has 128.\n\nAdd the frame pointer to the offset in the JIT, where rbp vs r9 is\nknown, and pass the pointer in AX.\n\narm64 and powerpc JITs keep the address of private stack in BPF_REG_FP\nand are not affected."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2fb761823eadf2fdfb6fdf146c4b94807b4bc3ba","status":"affected","lessThan":"1545deb8c5266812cfb4f355fbdb8436bbae83bb","versionType":"git"},{"version":"2fb761823eadf2fdfb6fdf146c4b94807b4bc3ba","status":"affected","lessThan":"f430d4a1c8c631a5f264f5d9df41bfe859155679","versionType":"git"},{"version":"2fb761823eadf2fdfb6fdf146c4b94807b4bc3ba","status":"affected","lessThan":"bb83425b3cdcb7bb3c629598a4d5efad9cc80733","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/x86/net/bpf_jit_comp.c","arch/x86/net/bpf_timed_may_goto.S"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.18.66","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":["arch/x86/net/bpf_jit_comp.c","arch/x86/net/bpf_timed_may_goto.S"]}],"references":[{"url":"https://git.kernel.org/stable/c/1545deb8c5266812cfb4f355fbdb8436bbae83bb"},{"url":"https://git.kernel.org/stable/c/f430d4a1c8c631a5f264f5d9df41bfe859155679"},{"url":"https://git.kernel.org/stable/c/bb83425b3cdcb7bb3c629598a4d5efad9cc80733"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:36:28.261Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}