CVE-2025-38710 gfs2: Validate i_depth for exhash directories
A missing validation in the Linux kernel GFS2 filesystem allows a local attacker to trigger undefined behavior via a zero depth value, causing a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-38710?
CVE-2025-38710 is a high-severity vulnerability in Linux kernel, published on 4 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
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'.
Which versions are affected by CVE-2025-38710?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-38710?
Apply the vendor's patch.
Is CVE-2025-38710 being exploited?
There is no known exploitation of CVE-2025-38710 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-38710, DEBIAN-CVE-2025-38710, GHSA-c47v-8m9c-7hhr, OESA-2025-2312, ROOT-OS-DEBIAN-11-CVE-2025-38710, ROOT-OS-DEBIAN-12-CVE-2025-38710 and 3 more.