{"api_version":"1","generated_at":"2026-11-30T16:45:42+00:00","cve":"CVE-2026-139451","urls":{"html":"https://cve.report/CVE-2026-139451","api":"https://cve.report/api/cve/CVE-2026-139451.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139451","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139451"},"summary":{"title":"bpf, arm64: Fix racy plt target update in bpf_arch_text_poke()","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:19:16","updated_at":"2026-11-30 14:19:16"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/cac68ace7b7c6bd695f31d614c2cd980d9287a2f","name":"https://git.kernel.org/stable/c/cac68ace7b7c6bd695f31d614c2cd980d9287a2f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fcb7a912873327eb621be0fc12dc147cd2c28d58","name":"https://git.kernel.org/stable/c/fcb7a912873327eb621be0fc12dc147cd2c28d58","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6335e6719fd323c345427b7cf2d5d17c28fdbc41","name":"https://git.kernel.org/stable/c/6335e6719fd323c345427b7cf2d5d17c28fdbc41","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f2e7723a7dcd14cbfdf3066c286943dcb2b82709","name":"https://git.kernel.org/stable/c/f2e7723a7dcd14cbfdf3066c286943dcb2b82709","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139451","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139451","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1dad391daef129e01e28206b8d586608ff026548 fcb7a912873327eb621be0fc12dc147cd2c28d58 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1dad391daef129e01e28206b8d586608ff026548 f2e7723a7dcd14cbfdf3066c286943dcb2b82709 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1dad391daef129e01e28206b8d586608ff026548 cac68ace7b7c6bd695f31d614c2cd980d9287a2f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1dad391daef129e01e28206b8d586608ff026548 6335e6719fd323c345427b7cf2d5d17c28fdbc41 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.9","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.9 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.120 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["arch/arm64/net/bpf_jit_comp.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"fcb7a912873327eb621be0fc12dc147cd2c28d58","status":"affected","version":"1dad391daef129e01e28206b8d586608ff026548","versionType":"git"},{"lessThan":"f2e7723a7dcd14cbfdf3066c286943dcb2b82709","status":"affected","version":"1dad391daef129e01e28206b8d586608ff026548","versionType":"git"},{"lessThan":"cac68ace7b7c6bd695f31d614c2cd980d9287a2f","status":"affected","version":"1dad391daef129e01e28206b8d586608ff026548","versionType":"git"},{"lessThan":"6335e6719fd323c345427b7cf2d5d17c28fdbc41","status":"affected","version":"1dad391daef129e01e28206b8d586608ff026548","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["arch/arm64/net/bpf_jit_comp.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.9"},{"lessThan":"6.9","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.120","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.120","versionStartIncluding":"6.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"6.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"6.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.9","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:34:52.647Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/fcb7a912873327eb621be0fc12dc147cd2c28d58"},{"url":"https://git.kernel.org/stable/c/f2e7723a7dcd14cbfdf3066c286943dcb2b82709"},{"url":"https://git.kernel.org/stable/c/cac68ace7b7c6bd695f31d614c2cd980d9287a2f"},{"url":"https://git.kernel.org/stable/c/6335e6719fd323c345427b7cf2d5d17c28fdbc41"}],"title":"bpf, arm64: Fix racy plt target update in bpf_arch_text_poke()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139451","datePublished":"2026-11-30T13:34:52.647Z","dateReserved":"2026-11-30T13:22:15.934Z","dateUpdated":"2026-11-30T13:34:52.647Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:19:16","lastModifiedDate":"2026-11-30 14:19:16","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139451","Ordinal":"1","Title":"bpf, arm64: Fix racy plt target update in bpf_arch_text_poke()","CVE":"CVE-2026-139451","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139451","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"bpf, arm64: Fix racy plt target update in bpf_arch_text_poke()"}]}}}