CVE-2025-38710

CVE-2025-38710

High · published September 4, 2025

CVSS v3.1
7.8
EPSS
0%
Percentile
4.6
In the wild
Unconfirmed
What it is

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'.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00158 · 4.6th percentile
Published
2025-09-04T20:15Z
Affected products (3)
ProductVersionsFixed in
linux/linux_kernel< 6.12.436.12.43
linux/linux_kernel≥ 6.13, < 6.15.116.15.11
linux/linux_kernel≥ 6.16, < 6.16.26.16.2
References (8)
EPSS history
Timeline
  • 04 SEP 15:33Z
    gfs2: Validate i_depth for exhash directories
    cvelistv5