Security mailing lists by PureSourceCode

CVE-2026-139163

not scored yet

bpf: Keep stack arguments in arch_bpf_timed_may_goto()

In the Linux kernel, the following vulnerability has been resolved:

bpf: Keep stack arguments in arch_bpf_timed_may_goto()

The JITs pass the first stack arguments of a call in registers:

x86-64 r9 argument 6
arm64 x5-x7 arguments 6-8
riscv64 a5-a7 arguments 6-8

'*(u64 *)(r11 - 8) = rX' writes such a register in the caller.
'rX = *(u64 *)(r11 + 8)' reads it in the callee. A call changes these
registers. Thus the verifier accepts no call between the write and the call
of the callee, and no call in the callee before the read.

may_goto is not a call for the verifier. But one time in 65535 iterations
it calls arch_bpf_timed_may_goto(), and this function calls C code. It
saves R0-R5 only.

   *(u64 *)(r11 - 8) = 0      ; the verifier: argument 6 is 0
   call sub

sub:
1: may_goto 2f ; C code changes r9
goto 1b
2: r2 = *(u64 *)(r11 + 8) ; r2 is a kernel address
r1 = map_value
r1 += r2
*(u64 *)(r1 + 0) = 0

On x86-64 the C code changes r9 when the time of may_goto is up. With the
hpet clocksource a look at the clock changes r9 too. The prog above crashes
the kernel. LLVM does not emit such code: it reads stack arguments at the
entry of a function, and it writes them immediately before the call.

Save and restore these registers too. The cost is 2 insns on x86-64, 4 on
arm64 and 6 on riscv64, one time in 65535 iterations.

Published
30 Nov 2026
Last modified
30 Nov 2026
Assigned by
416baaa9-dc9f-4396-8d5f-8c081fb06d67
NVD status
Received
Sources
NVDJSONCVE ListJSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
CVE List Linux Linux >= 324c3ca6eed6fb7ec4e50f31d537953038b13c5f, < 009c5c6acd08f93a9bbf55c0881ae06cc221247a; >= 324c3ca6eed6fb7ec4e50f31d537953038b13c5f, < 4d0f560f4926417f010ce38f8628c41bcad29c9f 009c5c6acd08f93a9bbf55c0881ae06cc221247a, 4d0f560f4926417f010ce38f8628c41bcad29c9f
CVE List Linux Linux = 7.2

References

History

  • 30 Nov 2026 14:45 UTC · NVD: first stored (published 30 Nov 2026)
  • 30 Nov 2026 13:58 UTC · CVE List: first stored (published 30 Nov 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.