CVE-2026-12235
Full vulnerability record from the local CVENow database.
Description
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.
View original CVE JSON
{
"id": "CVE-2026-12235",
"sourceIdentifier": "[email protected]",
"published": "2026-08-12T05:17:42.277",
"lastModified": "2026-10-23T20:10:00.160",
"vulnStatus": "Awaiting Analysis",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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().\n\nrela.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.\n\nThe 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.\n\nThe fix adds a bound check rejecting any RELA entry whose r_offset >= tgt->sh_size, mirroring the existing validation in the shared branch."
},
{
"lang": "es",
"value": "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().\n\nrela.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.\n\nLa 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.\n\nLa 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."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "zephyrproject",
"product": "zephyr",
"defaultStatus": "unaffected",
"collectionURL": "https://github.com/zephyrproject-rtos/zephyr",
"packageName": "zephyr",
"programFiles": [
"subsys/llext/llext_link.c"
],
"versions": [
{
"version": "3.7.0",
"lessThan": "4.4.2",
"versionType": "semver",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H",
"baseScore": 6.3,
"baseSeverity": "MEDIUM",
"attackVector": "LOCAL",
"attackComplexity": "HIGH",
"privilegesRequired": "LOW",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 1.0,
"impactScore": 5.2
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-08-12T12:34:31.991332Z",
"id": "CVE-2026-12235",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-787"
}
]
}
],
"references": [
{
"url": "https://github.com/zephyrproject-rtos/zephyr/commit/106540afbd22087ad40b90f53fb22657754a719e",
"source": "[email protected]"
},
{
"url": "https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-xv9q-6mrf-8j49",
"source": "[email protected]"
},
{
"url": "https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-xv9q-6mrf-8j49",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
}
]
}