// For flags

CVE-2024-26982

Squashfs: check the inode number is not the invalid value of zero

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

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.

[phillip@squashfs.org.uk: whitespace fix]
Link: https://lkml.kernel.org/r/20240409204723.446925-1-phillip@squashfs.org.uk

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. [phillip@squashfs.org.uk: corrección de espacios en blanco] Enlace: https://lkml.kernel.org/r/20240409204723.446925-1-phillip@squashfs.org.uk

A flaw was found in the squashfs module in the Linux kernel. A missing check of an inode number with an invalid value of zero can cause an out-of-bounds read and result in a denial of service.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-02-19 CVE Reserved
  • 2024-05-01 CVE Published
  • 2024-05-03 EPSS Updated
  • 2024-11-05 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-125: Out-of-bounds Read
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
< 6.6.30
Search vendor "Linux" for product "Linux Kernel" and version " < 6.6.30"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
< 6.8.8
Search vendor "Linux" for product "Linux Kernel" and version " < 6.8.8"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
< 6.9
Search vendor "Linux" for product "Linux Kernel" and version " < 6.9"
en
Affected