# CVE-2025-38710: gfs2: Validate i\_depth for exhash directories

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-09-04 · Modified: 2026-10-15
- Aliases: UBUNTU-CVE-2025-38710, DEBIAN-CVE-2025-38710
- Record: https://cvemate.com/vulnerability/CVE-2025-38710 · JSON: https://cvemate.com/vulnerability/CVE-2025-38710/json

## Description

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

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.175%, percentile 7.197%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 153)

- debian linux (Debian): \< 6.1.176-1 \| \< 6.12.43-1 \| \< 6.16.3-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-186.196 \| \< 6.8.0-100.100
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1112.119 \| \< 6.8.0-1046.49
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1112.119~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1046.49~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1112.119+fips1 \| \< 6.8.0-1046.49+fips1
- ubuntu linux-aws-hwe (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1117.126 \| \< 6.8.0-1046.52
- ubuntu linux-azure-4.15 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 41)

- <https://git.kernel.org/stable/c/076e992752e4b24178918f748d75597c80a408d2>
- <https://git.kernel.org/stable/c/366183911b153e9b8cf758e1414e1154d7569337>
- <https://git.kernel.org/stable/c/112bb60cd0e254a369e95aa9941a694ffeca089f>
- <https://git.kernel.org/stable/c/cddea0c721106ea480371412d8de21705eb27376>
- <https://git.kernel.org/stable/c/53a0249d68a210c16e961b83adfa82f94ee0a53d>
- <https://git.kernel.org/stable/c/b5f46951e62377b6e406fadc18bc3c5bdf1632a7>
- <https://git.kernel.org/stable/c/9680c58675b82348ab84d387e4fa727f7587e1a0>
- <https://git.kernel.org/stable/c/557c024ca7250bb65ae60f16c02074106c2f197b>
- <https://ubuntu.com/security/CVE-2025-38710>
- <https://www.cve.org/CVERecord?id=CVE-2025-38710>
- <https://git.kernel.org/linus/557c024ca7250bb65ae60f16c02074106c2f197b>
- <https://ubuntu.com/security/notices/USN-8028-1>
- <https://ubuntu.com/security/notices/USN-8028-2>
- <https://ubuntu.com/security/notices/USN-8031-1>
- <https://ubuntu.com/security/notices/USN-8028-3>
- <https://ubuntu.com/security/notices/USN-8028-4>
- <https://ubuntu.com/security/notices/USN-8028-5>
- <https://ubuntu.com/security/notices/USN-8031-2>
- <https://ubuntu.com/security/notices/USN-8028-6>
- <https://ubuntu.com/security/notices/USN-8031-3>

---

Data as of 2026-12-05T04:44:54.694Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
