CVE-2025-38710

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-38710
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38710.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38710
Downstream
Related
Published
2025-09-04T15:33:00.629Z
Modified
2025-11-28T02:34:31.067564Z
Summary
gfs2: Validate i_depth for exhash directories
Details

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 direread(), causing an undefined shift by 32 at:

index = hash >> (32 - dip->i_depth);

As calculated in an open-coded way in dirmakeexhash(), the minimum depth for an exhash directory is ilog2(sdp->sdhashptrs) and 0 is invalid as sdp->sdhashptrs 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 gfs2dinodein(). Values greater than the maximum are already being checked for there.

Also switch the calculation in dirmakeexhash() to use ilog2() to clarify how the depth is calculated.

Tested with the syzkaller repro.c and xfstests '-g quick'.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38710.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
53a0249d68a210c16e961b83adfa82f94ee0a53d
Fixed
b5f46951e62377b6e406fadc18bc3c5bdf1632a7
Fixed
9680c58675b82348ab84d387e4fa727f7587e1a0
Fixed
557c024ca7250bb65ae60f16c02074106c2f197b

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.12.43
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.15.11
Type
ECOSYSTEM
Events
Introduced
6.16.0
Fixed
6.16.2