CVE-2023-52499

In the Linux kernel, the following vulnerability has been resolved: powerpc/47x: Fix 47x syscall return crash Eddie reported that newer kernels were crashing during boot on his 476 FSP2 system: kernel tried to execute user page (b7ee2000) - exploit attempt? (uid: 0) BUG: Unable to handle kernel instruction fetch Faulting instruction address: 0xb7ee2000 Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=4K FSP-2 Modules linked in: CPU: 0 PID: 61 Comm: mount Not tainted 6.1.55-d23900f.ppcnf-fsp2 #1 Hardware name: ibm,fsp2 476fpe 0x7ff520c0 FSP-2 NIP:  b7ee2000 LR: 8c008000 CTR: 00000000 REGS: bffebd83 TRAP: 0400   Not tainted (6.1.55-d23900f.ppcnf-fs p2) MSR:  00000030 <IR,DR>  CR: 00001000  XER: 20000000 GPR00: c00110ac bffebe63 bffebe7e bffebe88 8c008000 00001000 00000d12 b7ee2000 GPR08: 00000033 00000000 00000000 c139df10 48224824 1016c314 10160000 00000000 GPR16: 10160000 10160000 00000008 00000000 10160000 00000000 10160000 1017f5b0 GPR24: 1017fa50 1017f4f0 1017fa50 1017f740 1017f630 00000000 00000000 1017f4f0 NIP [b7ee2000] 0xb7ee2000 LR [8c008000] 0x8c008000 Call Trace: Instruction dump: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX ---[ end trace 0000000000000000 ]--- The problem is in ret_from_syscall where the check for icache_44x_need_flush is done. When the flush is needed the code jumps out-of-line to do the flush, and then intends to jump back to continue the syscall return. However the branch back to label 1b doesn't return to the correct location, instead branching back just prior to the return to userspace, causing bogus register values to be used by the rfi. The breakage was introduced by commit 6f76a01173cc ("powerpc/syscall: implement system call entry/exit logic in C for PPC32") which inadvertently removed the "1" label and reused it elsewhere. Fix it by adding named local labels in the correct locations. Note that the return label needs to be outside the ifdef so that CONFIG_PPC_47x=n compiles.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc5:*:*:*:*:*:*

History

13 Jan 2025, 18:29

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CWE NVD-CWE-noinfo
References () https://git.kernel.org/stable/c/29017ab1a539101d9c7bec63cc13a019f97b2820 - () https://git.kernel.org/stable/c/29017ab1a539101d9c7bec63cc13a019f97b2820 - Patch
References () https://git.kernel.org/stable/c/70f6756ad96dd70177dddcfac2fe4bd4bb320746 - () https://git.kernel.org/stable/c/70f6756ad96dd70177dddcfac2fe4bd4bb320746 - Patch
References () https://git.kernel.org/stable/c/8ac2689502f986a46f4221e239d4ff2897f1ccb3 - () https://git.kernel.org/stable/c/8ac2689502f986a46f4221e239d4ff2897f1ccb3 - Patch
References () https://git.kernel.org/stable/c/f0eee815babed70a749d2496a7678be5b45b4c14 - () https://git.kernel.org/stable/c/f0eee815babed70a749d2496a7678be5b45b4c14 - Patch
CPE cpe:2.3:o:linux:linux_kernel:6.6:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.6:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
First Time Linux
Linux linux Kernel

21 Nov 2024, 08:39

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se resolvió la siguiente vulnerabilidad: powerpc/47x: Se corrigió la falla de devolución de la llamada al sistema 47x Eddie informó que los kernels más nuevos fallaban durante el arranque en su sistema 476 FSP2: el kernel intentó ejecutar la página del usuario (b7ee2000): ¿intento de explotación? (uid: 0) ERROR: No se puede manejar la recuperación de instrucciones del kernel Dirección de instrucción errónea: 0xb7ee2000 Ups: Acceso al kernel del área defectuosa, firma: 11 [#1] BE PAGE_SIZE=4K FSP-2 Módulos vinculados en: CPU: 0 PID: 61 Comm: mount No contaminado 6.1.55-d23900f.ppcnf-fsp2 #1 Nombre de hardware: ibm,fsp2 476fpe 0x7ff520c0 FSP-2 NIP: b7ee2000 LR: 8c008000 CTR: 00000000 REGS: bffebd83 TRAP: 0400 No contaminado (6.1. 55-d23900f .ppcnf-fs p2) MSR: 00000030 CR: 00001000 XER: 20000000 GPR00: c00110ac bffebe63 bffebe7e bffebe88 8c008000 00001000 00000d12 b7ee2000 GPR08: 00000 033 00000000 00000000 c139df10 48224824 1016c314 10160000 00000000 GPR16: 10160000 10160000 00000008 00000000 10160000 00000000 10160000 1017f5b0 GPR24: 1017fa50 1017f4f0 1017fa50 1017f740 1017f630 00000000 00000000 1017f4f0 NIP [b7ee2000] 0xb7ee2000 LR [8c008000] 0x8c008000 Seguimiento de llamadas: volcado de instrucciones : XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX ---[ fin de seguimiento 00000000000000000 ] --- El problema está en ret_from_syscall donde se realiza la verificación de icache_44x_need_flush. Cuando se necesita la descarga, el código salta fuera de línea para realizar la descarga y luego intenta saltar hacia atrás para continuar con el retorno de la llamada al sistema. Sin embargo, la bifurcación de regreso a la etiqueta 1b no regresa a la ubicación correcta, sino que se bifurca justo antes de regresar al espacio de usuario, lo que provoca que el rfi utilice valores de registro falsos. La falla fue introducida por el commit 6f76a01173cc ("powerpc/syscall: implementar lógica de entrada/salida de llamadas al sistema en C para PPC32") que sin darse cuenta eliminó la etiqueta "1" y la reutilizó en otro lugar. Solucionelo agregando etiquetas locales con nombre en las ubicaciones correctas. Tenga en cuenta que la etiqueta de devolución debe estar fuera de ifdef para que CONFIG_PPC_47x=n se compile.
References () https://git.kernel.org/stable/c/29017ab1a539101d9c7bec63cc13a019f97b2820 - () https://git.kernel.org/stable/c/29017ab1a539101d9c7bec63cc13a019f97b2820 -
References () https://git.kernel.org/stable/c/70f6756ad96dd70177dddcfac2fe4bd4bb320746 - () https://git.kernel.org/stable/c/70f6756ad96dd70177dddcfac2fe4bd4bb320746 -
References () https://git.kernel.org/stable/c/8ac2689502f986a46f4221e239d4ff2897f1ccb3 - () https://git.kernel.org/stable/c/8ac2689502f986a46f4221e239d4ff2897f1ccb3 -
References () https://git.kernel.org/stable/c/f0eee815babed70a749d2496a7678be5b45b4c14 - () https://git.kernel.org/stable/c/f0eee815babed70a749d2496a7678be5b45b4c14 -

02 Mar 2024, 22:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-03-02 22:15

Updated : 2025-01-13 18:29


NVD link : CVE-2023-52499

Mitre link : CVE-2023-52499

CVE.ORG link : CVE-2023-52499


JSON object : View

Products Affected

linux

  • linux_kernel