CVE-2025-38710

In the Linux kernel, the following vulnerability has been resolved: gfs2: Validate i_depth for exhash directories A fuzzer test introduced corruption that ends up with a depth of 0 in dir_e_read(), causing an undefined shift by 32 at: index = hash >> (32 - dip->i_depth); As calculated in an open-coded way in dir_make_exhash(), the minimum depth for an exhash directory is ilog2(sdp->sd_hash_ptrs) and 0 is invalid as sdp->sd_hash_ptrs is fixed as sdp->bsize / 16 at mount time. So we can avoid the undefined behaviour by checking for depth values lower than the minimum in gfs2_dinode_in(). Values greater than the maximum are already being checked for there. Also switch the calculation in dir_make_exhash() to use ilog2() to clarify how the depth is calculated. Tested with the syzkaller repro.c and xfstests '-g quick'.
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:*:*:*:*:*:*:*:*

History

19 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: gfs2: Validar i_depth para directorios exhash Una prueba de fuzzer introdujo corrupción que resulta en una profundidad de 0 en dir_e_read(), causando un desplazamiento indefinido de 32 en: index = hash >> (32 - dip->i_depth); Según se calcula de forma abierta en dir_make_exhash(), la profundidad mínima para un directorio exhash es ilog2(sdp->sd_hash_ptrs) y 0 no es válido ya que sdp->sd_hash_ptrs se fija como sdp->bsize / 16 en el momento del montaje. Así podemos evitar el comportamiento indefinido comprobando los valores de profundidad inferiores al mínimo en gfs2_dinode_in(). Los valores mayores que el máximo ya se están comprobando allí. También cambiar el cálculo en dir_make_exhash() para usar ilog2() para clarificar cómo se calcula la profundidad. Probado con syzkaller repro.c y xfstests '-g quick'.

Information

Published : 2025-09-04 16:15

Updated : 2026-10-19 21:10


NVD link : CVE-2025-38710

Mitre link : CVE-2025-38710

CVE.ORG link : CVE-2025-38710


JSON object : View

Products Affected

linux

  • linux_kernel