CVE-2025-71159

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix use-after-free warning in btrfs_get_or_create_delayed_node() Previously, btrfs_get_or_create_delayed_node() set the delayed_node's refcount before acquiring the root->delayed_nodes lock. Commit e8513c012de7 ("btrfs: implement ref_tracker for delayed_nodes") moved refcount_set inside the critical section, which means there is no longer a memory barrier between setting the refcount and setting btrfs_inode->delayed_node. Without that barrier, the stores to node->refs and btrfs_inode->delayed_node may become visible out of order. Another thread can then read btrfs_inode->delayed_node and attempt to increment a refcount that hasn't been set yet, leading to a refcounting bug and a use-after-free warning. The fix is to move refcount_set back to where it was to take advantage of the implicit memory barrier provided by lock acquisition. Because the allocations now happen outside of the lock's critical section, they can use GFP_NOFS instead of GFP_ATOMIC.
Configurations

Configuration 1 (hide)

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

History

30 Jul 2026, 06:24

Type Values Removed Values Added
CVSS v2 : unknown
v3 : 7.8
v2 : unknown
v3 : 9.8

17 Jun 2026, 10:03

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: btrfs: soluciona la advertencia de uso después de liberación en btrfs_get_or_create_delayed_node() Anteriormente, btrfs_get_or_create_delayed_node() establecía el refcount del delayed_node antes de adquirir el bloqueo root->delayed_nodes. El commit e8513c012de7 ('btrfs: implementa ref_tracker para delayed_nodes') movió refcount_set dentro de la sección crítica, lo que significa que ya no hay una barrera de memoria entre el establecimiento del refcount y el establecimiento de btrfs_inode->delayed_node. Sin esa barrera, los almacenamientos en node->refs y btrfs_inode->delayed_node pueden volverse visibles fuera de orden. Otro hilo puede entonces leer btrfs_inode->delayed_node e intentar incrementar un refcount que aún no ha sido establecido, lo que lleva a un error de refcounting y a una advertencia de uso después de liberación. La solución es mover refcount_set de vuelta a donde estaba para aprovechar la barrera de memoria implícita proporcionada por la adquisición del bloqueo. Debido a que las asignaciones ahora ocurren fuera de la sección crítica del bloqueo, pueden usar GFP_NOFS en lugar de GFP_ATOMIC.

26 Feb 2026, 20:19

Type Values Removed Values Added
CWE CWE-416
First Time Linux
Linux linux Kernel
References () https://git.kernel.org/stable/c/83f59076a1ae6f5c6845d6f7ed3a1a373d883684 - () https://git.kernel.org/stable/c/83f59076a1ae6f5c6845d6f7ed3a1a373d883684 - Patch
References () https://git.kernel.org/stable/c/c8385851a5435f4006281828d428e5d0b0bbf8af - () https://git.kernel.org/stable/c/c8385851a5435f4006281828d428e5d0b0bbf8af - Patch
CPE cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8

23 Jan 2026, 16:15

Type Values Removed Values Added
New CVE

Information

Published : 2026-01-23 16:15

Updated : 2026-07-30 06:24


NVD link : CVE-2025-71159

Mitre link : CVE-2025-71159

CVE.ORG link : CVE-2025-71159


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-416

Use After Free