{"id":"CVE-2026-139451","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:19:16.070","lastModified":"2026-11-30T14:19:16.070","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, arm64: Fix racy plt target update in bpf_arch_text_poke()\n\nWhen a long-jump trampoline is attached to or detached from a bpf prog,\nbpf_arch_text_poke() updates the plt target at the end of the prog by\ntemporarily making the page writable:\n\n\tset_memory_rw(page);\n\tWRITE_ONCE(plt->target, plt_target);\n\tset_memory_ro(page);\n\nSince commit 1dad391daef1 (\"bpf, arm64: use bpf_prog_pack for memory\nmanagement\"), bpf progs are allocated from the bpf prog pack, so\nunrelated progs and their plts commonly share a page. The sequence\nabove is not serialized against other pokers, it runs before text_mutex\nis taken and callers only hold the lock of the trampoline being\nupdated. Two CPUs attaching to or detaching from different target progs\nin the same page can therefore race:\n\n\tCPU A                           CPU B\n\tset_memory_rw(page)\n\t                                set_memory_rw(page)\n\t                                WRITE_ONCE(plt_B->target, ...)\n\t                                set_memory_ro(page)\n\tWRITE_ONCE(plt_A->target, ...)  <- permission fault\n\nThis was hit on an arm64 server with 64K pages while attaching fentry\nprograms to bpf progs:\n\n  Unable to handle kernel write to read-only memory at virtual address ffff80008f46d5f8\n  ESR = 0x000000009600004f\n  FSC = 0x0f: level 3 permission fault\n  pte=00c00200ea5a0783\n  Internal error: Oops: 000000009600004f [#1]  SMP\n  pc : bpf_arch_text_poke+0x214/0x238\n  lr : bpf_arch_text_poke+0x200/0x238\n  Call trace:\n   bpf_arch_text_poke+0x214/0x238 (P)\n   __bpf_trampoline_link_prog+0x1c8/0x470\n   bpf_trampoline_link_prog+0x64/0x90\n   bpf_tracing_prog_attach+0x318/0x4a8\n   bpf_raw_tp_link_attach+0x104/0x258\n   bpf_raw_tracepoint_open+0x6c/0x90\n   __sys_bpf+0x134c/0x3e10\n\nRather than serializing the permission changes, stop changing page\npermissions altogether and write the plt target with\naarch64_insn_write_literal_u64(). It writes through the text patching\nfixmap under patch_lock, the same way the rest of the prog pack is\nwritten, and performs a single-copy atomic 64-bit store. The plt target\nis naturally aligned (see build_plt()), so CPUs concurrently executing\nthe plt still observe either the old or the new target. This is the\nsame helper ftrace and static calls use to update 64-bit literals that\nare loaded concurrently."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["arch/arm64/net/bpf_jit_comp.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"1dad391daef129e01e28206b8d586608ff026548","lessThan":"fcb7a912873327eb621be0fc12dc147cd2c28d58","versionType":"git","status":"affected"},{"version":"1dad391daef129e01e28206b8d586608ff026548","lessThan":"f2e7723a7dcd14cbfdf3066c286943dcb2b82709","versionType":"git","status":"affected"},{"version":"1dad391daef129e01e28206b8d586608ff026548","lessThan":"cac68ace7b7c6bd695f31d614c2cd980d9287a2f","versionType":"git","status":"affected"},{"version":"1dad391daef129e01e28206b8d586608ff026548","lessThan":"6335e6719fd323c345427b7cf2d5d17c28fdbc41","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["arch/arm64/net/bpf_jit_comp.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.9","status":"affected"},{"version":"0","lessThan":"6.9","versionType":"semver","status":"unaffected"},{"version":"6.12.120","lessThanOrEqual":"6.12.*","versionType":"semver","status":"unaffected"},{"version":"6.18.65","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.6","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/6335e6719fd323c345427b7cf2d5d17c28fdbc41","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/cac68ace7b7c6bd695f31d614c2cd980d9287a2f","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/f2e7723a7dcd14cbfdf3066c286943dcb2b82709","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/fcb7a912873327eb621be0fc12dc147cd2c28d58","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}