In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix potential null-ptr-deref in nilfs_btree_insert() Patch series "nilfs2: fix potential issues with empty b-tree nodes". This series addresses three potential issues with empty b-tree nodes that can occur with corrupted filesystem images, including one recently discovered by syzbot. This patch (of 3): If a b-tree is broken on the device, and the b-tree height is greater than 2 (the level of the root node is greater than 1) even if the number of child nodes of the b-tree root is 0, a NULL pointer dereference occurs in nilfs_btree_prepare_insert(), which is called from nilfs_btree_insert(). This is because, when the number of child nodes of the b-tree root is 0, nilfs_btree_do_lookup() does not set the block buffer head in any of path[x].bp_bh, leaving it as the initial value of NULL, but if the level of the b-tree root node is greater than 1, nilfs_btree_get_nonroot_node(), which accesses the buffer memory of path[x].bp_bh, is called. Fix this issue by adding a check to nilfs_btree_root_broken(), which performs sanity checks when reading the root node from the device, to detect this inconsistency. Thanks to Lizhi Xu for trying to solve the bug and clarifying the cause early on.
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: nilfs2: soluciona una posible desreferencia de puntero nulo en nilfs_btree_insert() Serie de parches "nilfs2: soluciona posibles problemas con nodos de árbol b vacíos". Esta serie aborda tres posibles problemas con nodos de árbol b vacíos que pueden ocurrir con imágenes de sistema de archivos dañadas, incluido uno descubierto recientemente por syzbot. Este parche (de 3): Si un árbol b está roto en el dispositivo y la altura del árbol b es mayor que 2 (el nivel del nodo raíz es mayor que 1) incluso si el número de nodos secundarios de la raíz del árbol b es 0, se produce una desreferencia de puntero NULL en nilfs_btree_prepare_insert(), que se llama desde nilfs_btree_insert(). Esto se debe a que, cuando el número de nodos secundarios de la raíz del árbol b es 0, nilfs_btree_do_lookup() no establece el encabezado del búfer de bloque en ninguno de los path[x].bp_bh, dejándolo como el valor inicial de NULL, pero si el nivel del nodo raíz del árbol b es mayor que 1, se llama a nilfs_btree_get_nonroot_node(), que accede a la memoria del búfer de path[x].bp_bh. Solucione este problema agregando una verificación a nilfs_btree_root_broken(), que realiza verificaciones de cordura al leer el nodo raíz desde el dispositivo, para detectar esta inconsistencia. Gracias a Lizhi Xu por intentar resolver el error y aclarar la causa desde el principio.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
| Attack Vector | LOCAL |
|---|---|
| Attack Complexity | LOW |
| Privileges Required | LOW |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | NONE |
| Integrity Impact | NONE |
| Availability Impact | HIGH |
| Source | Type | Description |
|---|---|---|
| [email protected] | Primary |
en
CWE-476
|
| Vendor | Product | Version | Update | Type |
|---|---|---|---|---|
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd36b168780> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd370346c80> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd370346e40> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd370347900> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd36b168f40> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7fd36b168740> | Operating System |
| 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:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |