PT-2026-163492
CVE-2026-139451
·
Publicado
2026-11-30
·
Atualizado
2026-11-30
Descrição por
Pontuação
N/A
Não disponívelNão há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.
In the Linux kernel, the following vulnerability has been resolved:
bpf, arm64: Fix racy plt target update in bpf arch text poke()
When a long-jump trampoline is attached to or detached from a bpf prog,
bpf arch text poke() updates the plt target at the end of the prog by
temporarily making the page writable:
set memory rw(page);
WRITE ONCE(plt->target, plt target);
set memory ro(page);Since commit 1dad391daef1 ("bpf, arm64: use bpf prog pack for memory
management"), bpf progs are allocated from the bpf prog pack, so
unrelated progs and their plts commonly share a page. The sequence
above is not serialized against other pokers, it runs before text mutex
is taken and callers only hold the lock of the trampoline being
updated. Two CPUs attaching to or detaching from different target progs
in the same page can therefore race:
CPU A CPU B
set memory rw(page)
set memory rw(page)
WRITE ONCE(plt B->target, ...)
set memory ro(page)
WRITE ONCE(plt A->target, ...) <- permission faultThis was hit on an arm64 server with 64K pages while attaching fentry
programs to bpf progs:
Unable to handle kernel write to read-only memory at virtual address ffff80008f46d5f8
ESR = 0x000000009600004f
FSC = 0x0f: level 3 permission fault
pte=00c00200ea5a0783
Internal error: Oops: 000000009600004f [#1] SMP
pc : bpf arch text poke+0x214/0x238
lr : bpf arch text poke+0x200/0x238
Call trace:
bpf arch text poke+0x214/0x238 (P)
bpf trampoline link prog+0x1c8/0x470
bpf trampoline link prog+0x64/0x90
bpf tracing prog attach+0x318/0x4a8
bpf raw tp link attach+0x104/0x258
bpf raw tracepoint open+0x6c/0x90
sys bpf+0x134c/0x3e10
Rather than serializing the permission changes, stop changing page
permissions altogether and write the plt target with
aarch64 insn write literal u64(). It writes through the text patching
fixmap under patch lock, the same way the rest of the prog pack is
written, and performs a single-copy atomic 64-bit store. The plt target
is naturally aligned (see build plt()), so CPUs concurrently executing
the plt still observe either the old or the new target. This is the
same helper ftrace and static calls use to update 64-bit literals that
are loaded concurrently.
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾