CVE-2026-12235

The Linkable Loadable Extensions (llext) subsystem mis-handles PLT/RELA relocation entries when linking a relocatable (partially-linked) ELF extension. In llext_link_plt() (subsys/llext/llext_link.c), the relocatable branch (tgt != NULL, the path used for Xtensa relocatable objects) computed the patch address as ext->mem[LLEXT_MEM_TEXT] - text.sh_offset + rela.r_offset + tgt->sh_offset and then performed the relocation write there without validating rela.r_offset. Its sibling shared/dynamic branch already rejected out-of-range offsets via llext_file_offset(). rela.r_offset is read directly from the ELF's RELA table, so a crafted entry with an offset larger than the target section makes the write land arbitrarily far outside the extension's text buffer. The result is an attacker-influenced out-of-bounds write (the location via r_offset, the written value being the resolved symbol address) performed in supervisor context at link time, before any extension code runs. The path is reached from llext_load() whenever an application loads an attacker-influenced ELF extension on Xtensa with writable storage; llext is documented to accept extensions of untrusted origin. Impact is supervisor-context memory corruption (integrity and availability loss, and a sandbox-boundary escape for user-mode extensions). Exploitation is gated by the Xtensa relocatable PLT path and writable storage, and turning the out-of-range write into a useful primitive is non-trivial. The fix adds a bound check rejecting any RELA entry whose r_offset >= tgt->sh_size, mirroring the existing validation in the shared branch.
Configurations

No configuration.

History

23 Oct 2026, 20:10

Type Values Removed Values Added
Summary
  • (es) El subsistema Linkable Loadable Extensions (llext) maneja incorrectamente las entradas de reubicación PLT/RELA al enlazar una extensión ELF reubicable (parcialmente enlazada). En llext_link_plt() (subsys/llext/llext_link.c), la rama reubicable (tgt != NULL, la ruta utilizada para objetos reubicables de Xtensa) calculó la dirección del parche como ext -> mem[LLEXT_MEM_TEXT] - text.sh_offset + rela.r_offset + tgt -> sh_offset y luego realizó la escritura de reubicación allí sin validar rela.r_offset. Su rama hermana compartida/dinámica ya rechazaba offsets fuera de rango a través de llext_file_offset(). rela.r_offset se lee directamente de la tabla RELA del ELF, por lo que una entrada manipulada con un offset mayor que la sección objetivo hace que la escritura caiga arbitrariamente lejos fuera del búfer de texto de la extensión. El resultado es una escritura fuera de límites influenciada por el atacante (la ubicación a través de r_offset, el valor escrito siendo la dirección del símbolo resuelto) realizada en contexto de supervisor en tiempo de enlace, antes de que se ejecute cualquier código de la extensión. La ruta se alcanza desde llext_load() siempre que una aplicación carga una extensión ELF influenciada por el atacante en Xtensa con almacenamiento escribible; llext está documentado para aceptar extensiones de origen no confiable. El impacto es corrupción de memoria en contexto de supervisor (pérdida de integridad y disponibilidad, y un escape del límite de la sandbox para extensiones en modo usuario). La explotación está limitada por la ruta PLT reubicable de Xtensa y el almacenamiento escribible, y convertir la escritura fuera de rango en una primitiva útil no es trivial. La solución añade una comprobación de límites que rechaza cualquier entrada RELA cuyo r_offset >= tgt -> sh_size, reflejando la validación existente en la rama compartida.

Information

Published : 2026-08-12 05:17

Updated : 2026-10-23 20:10


NVD link : CVE-2026-12235

Mitre link : CVE-2026-12235

CVE.ORG link : CVE-2026-12235


JSON object : View

Products Affected

No product.

CWE
CWE-787

Out-of-bounds Write