Instituto Nacional de ciberseguridad. Sección Incibe
Instituto Nacional de Ciberseguridad. Sección INCIBE-CERT

CVE-2026-99092

Gravedad:
Pendiente de análisis
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
26/10/2026
Última modificación:
26/10/2026

Descripción

*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> riscv: patch: fix handling of bpf-jit execmem addresses<br /> <br /> Commit 8718e5a3090b ("riscv: patch: skip fixmap mapping when kernel text<br /> is already writable") gated the core_kernel_text() branch of patch_map()<br /> on CONFIG_STRICT_KERNEL_RWX, and explicitly left the vmalloc branch<br /> unchanged. That branch has a separate problem.<br /> <br /> That branch only creates a temporary writable fixmap alias when<br /> CONFIG_STRICT_MODULE_RWX is enabled, and otherwise assumes the target is<br /> directly writable and returns the address unchanged. That assumption no<br /> longer holds: bpf_prog_pack_alloc calls set_memory_rox() on every pack<br /> unconditionally in alloc_new_pack(), independently of any<br /> CONFIG_STRICT_*_RWX option, so BPF text in the vmalloc area is read-only<br /> regardless of what CONFIG_STRICT_MODULE_RWX says.<br /> <br /> With CONFIG_STRICT_MODULE_RWX=n, patch_map() returns the read-only<br /> address directly, the subsequent copy_to_kernel_nofault() takes a<br /> page fault and returns -EFAULT. bpf_arch_text_copy() turns that into<br /> -EINVAL, which propagates through bpf_jit_binary_pack_finalize() to the<br /> WARN_ON() in bpf_int_jit_compile() and leaves the program un-JITed.<br /> <br /> Note that BPF cannot be fixed the way kprobes was in<br /> commit bdc46e507b59 ("riscv: mm: make EXECMEM_KPROBES writable without<br /> CONFIG_STRICT_MODULE_RWX"). EXECMEM_BPF is already PAGE_KERNEL, i.e.<br /> writable at allocation time; the read-only mapping is established<br /> afterwards by generic code in alloc_new_pack(), which arch code cannot<br /> influence. The only place this can be handled is patch_map().<br /> <br /> This is the same problem that was fixed on arm64 by commit b1480ed230ac<br /> ("arm64: patching: fix handling of execmem addresses"), and the fix is<br /> the same: CONFIG_EXECMEM is what actually tracks whether the vmalloc<br /> area can hold executable memory that needs a temporary alias to be<br /> written. CONFIG_BPF_JIT, CONFIG_KPROBES and CONFIG_MODULES all select<br /> it.<br /> <br /> Note that this is not limited to CONFIG_MODULES=n. Unlike arm64, riscv<br /> selects CONFIG_ARCH_OPTIONAL_KERNEL_RWX, so CONFIG_STRICT_MODULE_RWX can<br /> be disabled with CONFIG_MODULES=y as well, and the bug is reachable in<br /> that configuration too.<br /> <br /> The !CONFIG_MMU build is unaffected: it has its own __patch_insn_set()<br /> and __patch_insn_write() implementations and never calls patch_map().

Impacto