IM
IronMonkey Threat Research

CVE-2024-26982 HIGH

Published: 2024-05-01 | Last Modified: 2026-05-12 | Status: Modified

Description

In the Linux kernel, the following vulnerability has been resolved: Squashfs: check the inode number is not the invalid value of zero Syskiller has produced an out of bounds access in fill_meta_index(). That out of bounds access is ultimately caused because the inode has an inode number with the invalid value of zero, which was not checked. The reason this causes the out of bounds access is due to following sequence of events: 1. Fill_meta_index() is called to allocate (via empty_meta_index()) and fill a metadata index. It however suffers a data read error and aborts, invalidating the newly returned empty metadata index. It does this by setting the inode number of the index to zero, which means unused (zero is not a valid inode number). 2. When fill_meta_index() is subsequently called again on another read operation, locate_meta_index() returns the previous index because it matches the inode number of 0. Because this index has been returned it is expected to have been filled, and because it hasn't been, an out of bounds access is performed. This patch adds a sanity check which checks that the inode number is not zero when the inode is created and returns -EINVAL if it is. [[email protected]: whitespace fix]

Additional Descriptions (1)

En el kernel de Linux se ha resuelto la siguiente vulnerabilidad: Squashfs: comprobar que el número de inodo no sea el valor no válido de cero. Syskiller ha producido un acceso fuera de los límites en fill_meta_index(). Ese acceso fuera de los límites se debe en última instancia a que el inodo tiene un número de inodo con un valor no válido de cero, que no se verificó. La razón por la que esto causa el acceso fuera de los límites se debe a la siguiente secuencia de eventos: 1. Se llama a Fill_meta_index() para asignar (a través de vacío_meta_index()) y completar un índice de metadatos. Sin embargo, sufre un error de lectura de datos y se cancela, invalidando el índice de metadatos vacío recién devuelto. Para ello, establece el número de inodo del índice en cero, lo que significa que no se utiliza (cero no es un número de inodo válido). 2. Cuando posteriormente se vuelve a llamar a fill_meta_index() en otra operación de lectura, localizar_meta_index() devuelve el índice anterior porque coincide con el número de inodo de 0. Debido a que este índice ha sido devuelto, se espera que se haya completado, y porque no lo ha hecho. Si no lo ha sido, se realiza un acceso fuera de los límites. Este parche agrega una verificación de cordura que verifica que el número de inodo no sea cero cuando se crea el inodo y devuelve -EINVAL si lo es. [[email protected]: corrección de espacios en blanco] Enlace: https://lkml.kernel.org/r/[email protected]

CVSS Metrics

Base Score: 7.1 (HIGH)

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

Attack VectorLOCAL
Attack ComplexityLOW
Privileges RequiredLOW
User InteractionNONE
ScopeUNCHANGED
Confidentiality ImpactHIGH
Integrity ImpactNONE
Availability ImpactHIGH

Source: [email protected]

Type: Primary

Exploitability Score: 1.8

Impact Score: 5.2

Weaknesses

Source Type Description
[email protected] Primary
en CWE-125

Affected Products

Vendor Product Version Update Type
linux linux_kernel * <built-in method update of dict object at 0x7fd340ad9b80> Operating System
linux linux_kernel * <built-in method update of dict object at 0x7fd3703ceec0> Operating System
linux linux_kernel 6.9 <built-in method update of dict object at 0x7fd369eb2700> Operating System
linux linux_kernel 6.9 <built-in method update of dict object at 0x7fd36b3e1300> Operating System
linux linux_kernel 6.9 <built-in method update of dict object at 0x7fd39c4088c0> Operating System
linux linux_kernel 6.9 <built-in method update of dict object at 0x7fd370383340> Operating System

Affected Configurations

Operator: OR

Vulnerable CPE
Yes cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:6.9:rc4:*:*:*:*:*:*

References