{"id":"CVE-2024-57877","aliases":["CVE-2024-57877"],"related":[],"kind":"vulnerability","state":"published","title":"arm64: ptrace: fix partial SETREGSET for NT_ARM_POE","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\narm64: ptrace: fix partial SETREGSET for NT_ARM_POE\n\nCurrently poe_set() doesn't initialize the temporary 'ctrl' variable,\nand a SETREGSET call with a length of zero will leave this\nuninitialized. Consequently an arbitrary value will be written back to\ntarget->thread.por_el0, potentially leaking up to 64 bits of memory from\nthe kernel stack. The read is limited to a specific slot on the stack,\nand the issue does not provide a write mechanism.\n\nFix this by initializing the temporary value before copying the regset\nfrom userspace, as for other regsets (e.g. NT_PRSTATUS, NT_PRFPREG,\nNT_ARM_SYSTEM_CALL). In the case of a zero-length write, the existing\ncontents of POR_EL1 will be retained.\n\nBefore this patch:\n\n| # ./poe-test\n| Attempting to write NT_ARM_POE::por_el0 = 0x900d900d900d900d\n| SETREGSET(nt=0x40f, len=8) wrote 8 bytes\n|\n| Attempting to read NT_ARM_POE::por_el0\n| GETREGSET(nt=0x40f, len=8) read 8 bytes\n| Read NT_ARM_POE::por_el0 = 0x900d900d900d900d\n|\n| Attempting to write NT_ARM_POE (zero length)\n| SETREGSET(nt=0x40f, len=0) wrote 0 bytes\n|\n| Attempting to read NT_ARM_POE::por_el0\n| GETREGSET(nt=0x40f, len=8) read 8 bytes\n| Read NT_ARM_POE::por_el0 = 0xffff8000839c3d50\n\nAfter this patch:\n\n| # ./poe-test\n| Attempting to write NT_ARM_POE::por_el0 = 0x900d900d900d900d\n| SETREGSET(nt=0x40f, len=8) wrote 8 bytes\n|\n| Attempting to read NT_ARM_POE::por_el0\n| GETREGSET(nt=0x40f, len=8) read 8 bytes\n| Read NT_ARM_POE::por_el0 = 0x900d900d900d900d\n|\n| Attempting to write NT_ARM_POE (zero length)\n| SETREGSET(nt=0x40f, len=0) wrote 0 bytes\n|\n| Attempting to read NT_ARM_POE::por_el0\n| GETREGSET(nt=0x40f, len=8) read 8 bytes\n| Read NT_ARM_POE::por_el0 = 0x900d900d900d900d","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\narm64: ptrace: fix partial SETREGSET for NT_ARM_POE\n\nCurrently poe_set() doesn't initialize the temporary 'ctrl' variable,\nand a SETREGSET call with a length of zero will leave this\nuninitialized. Consequently an arbitrary value will be written back to\ntarget->thread.por_el0, potentially leaking up to 64 bits of memory from\nthe kernel stack. The read is limited to a specific slot on the stack,\nand the issue does not provide a write mechanism.\n\nFix this by initializing the temporary value before copying the regset\nfrom userspace, as for other regsets (e.g. NT_PRSTATUS, NT_PRFPREG,\nNT_ARM_SYSTEM_CALL). In the case of a zero-length write, the existing\ncontents of POR_EL1 will be retained.\n\nBefore this patch:\n\n| # ./poe-test\n| Attempting to write NT_ARM_POE::por_el0 = 0x900d900d900d900d\n| SETREGSET(nt=0x40f, len=8) wrote 8 bytes\n|\n| Attempting to read NT_ARM_POE::por_el0\n| GETREGSET(nt=0x40f, len=8) read 8 bytes\n| Read NT_ARM_POE::por_el0 = 0x900d900d900d900d\n|\n| Attempting to write NT_ARM_POE (zero length)\n| SETREGSET(nt=0x40f, len=0) wrote 0 bytes\n|\n| Attempting to read NT_ARM_POE::por_el0\n| GETREGSET(nt=0x40f, len=8) read 8 bytes\n| Read NT_ARM_POE::por_el0 = 0xffff8000839c3d50\n\nAfter this patch:\n\n| # ./poe-test\n| Attempting to write NT_ARM_POE::por_el0 = 0x900d900d900d900d\n| SETREGSET(nt=0x40f, len=8) wrote 8 bytes\n|\n| Attempting to read NT_ARM_POE::por_el0\n| GETREGSET(nt=0x40f, len=8) read 8 bytes\n| Read NT_ARM_POE::por_el0 = 0x900d900d900d900d\n|\n| Attempting to write NT_ARM_POE (zero length)\n| SETREGSET(nt=0x40f, len=0) wrote 0 bytes\n|\n| Attempting to read NT_ARM_POE::por_el0\n| GETREGSET(nt=0x40f, len=8) read 8 bytes\n| Read NT_ARM_POE::por_el0 = 0x900d900d900d900d","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: arm64: ptrace: corrección de SETREGSET parcial para NT_ARM_POE Actualmente, poe_set() no inicializa la variable temporal 'ctrl', y una llamada a SETREGSET con una longitud de cero la dejará sin inicializar. En consecuencia, se volverá a escribir un valor arbitrario en target-&gt;thread.por_el0, lo que podría provocar una fuga de hasta 64 bits de memoria de la pila del kernel. La lectura está limitada a una ranura específica en la pila, y el problema no proporciona un mecanismo de escritura. Corrija esto inicializando el valor temporal antes de copiar el conjunto de registros desde el espacio de usuario, como para otros conjuntos de registros (por ejemplo, NT_PRSTATUS, NT_PRFPREG, NT_ARM_SYSTEM_CALL). En el caso de una escritura de longitud cero, se conservarán los contenidos existentes de POR_EL1. Antes de este parche: | # ./poe-test | Intentando escribir NT_ARM_POE::por_el0 = 0x900d900d900d900d | SETREGSET(nt=0x40f, len=8) escribió 8 bytes | | Intentando leer NT_ARM_POE::por_el0 | GETREGSET(nt=0x40f, len=8) leyó 8 bytes | Leído NT_ARM_POE::por_el0 = 0x900d900d900d900d | | Intentando escribir NT_ARM_POE (longitud cero) | SETREGSET(nt=0x40f, len=0) escribió 0 bytes | | Intentando leer NT_ARM_POE::por_el0 | GETREGSET(nt=0x40f, len=8) leyó 8 bytes | Leer NT_ARM_POE::por_el0 = 0xffff8000839c3d50 Después de este parche: | # ./poe-test | Intentando escribir NT_ARM_POE::por_el0 = 0x900d900d900d900d | SETREGSET(nt=0x40f, len=8) escribió 8 bytes | | Intentando leer NT_ARM_POE::por_el0 | GETREGSET(nt=0x40f, len=8) leyó 8 bytes | Leer NT_ARM_POE::por_el0 = 0x900d900d900d900d | | Intentando escribir NT_ARM_POE (longitud cero) | SETREGSET(nt=0x40f, len=0) escribió 0 bytes | | Intentando leer NT_ARM_POE::por_el0 | GETREGSET(nt=0x40f, len=8) leer 8 bytes | Leer NT_ARM_POE::por_el0 = 0x900d900d900d900d","source":"nvd"}],"published":"2025-01-11T14:49:03.297Z","modified":"2026-06-17T08:14:07.687Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-908"],"affected":[{"ranges":[{"type":"git","introduced":"17519819926211e6b2834e00e4554bec0daf22ac","fixed":"4105dd76bc8ad6529d47157ef0565cb84ca6676c","status":"affected"},{"type":"git","introduced":"17519819926211e6b2834e00e4554bec0daf22ac","fixed":"594bfc4947c4fcabba1318d8384c61a29a6b89fb","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.12","status":"unaffected"},{"type":"semver","introduced":"6.12.5","lastAffected":"6.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.12","fixed":"6.12.5"},{"status":"affected","version":"6.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/4105dd76bc8ad6529d47157ef0565cb84ca6676c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/594bfc4947c4fcabba1318d8384c61a29a6b89fb","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-01T19:54:54.484Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-57877","url":"https://www.cve.org/CVERecord?id=CVE-2024-57877","licence":"CVE Terms of Use","modified":"2026-05-11T20:59:37.368Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-57877","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-57877","licence":"Public domain","modified":"2026-06-17T08:14:07.687Z"}],"updatedAt":"2026-11-25T22:58:50.944Z","epss":{"score":0.00268,"percentile":0.11811,"date":"2026-11-30T12:00:22.000Z"}}