Skip to content
Heist/ feed
Back to feed
HighFix available

gfs2: Validate i_depth for exhash directories

Type: advisorySources: OSV

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

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.258, 5.15.209, 6.1.175, 6.12.43, 6.15.11, 6.16.2, 6.6.134
CVEs
CVE-2025-38710
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 01:37 UTC · Revision 1

Source evidence

gfs2: Validate i_depth for exhash directories

core-osv · Original source

Published 4 Sept 2025, 15:33 UTC

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

osv:CVE-2025-38710

Kernel

Fixed versions: 5.10.258, 5.15.209, 6.1.175, 6.6.134, 6.12.43, 6.15.11, 6.16.2

Complete source record
{
  "id": "1e7da51b630f588669990547f32380c5466898e5d30314f04fbba77b93e28a74",
  "url": "https://osv.dev/vulnerability/CVE-2025-38710",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "gfs2: Validate i_depth for exhash directories",
    "summary": "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'.",
    "evidence": "osv:CVE-2025-38710",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.258",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.209",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.175",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.134",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.43",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.15.11",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.16.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-38710",
      "aliases": [
        "CVE-2025-38710"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "9a0045088d888c9c539c8c626a366cb52c0fbdab"
                },
                {
                  "fixed": "076e992752e4b24178918f748d75597c80a408d2"
                },
                {
                  "fixed": "366183911b153e9b8cf758e1414e1154d7569337"
                },
                {
                  "fixed": "112bb60cd0e254a369e95aa9941a694ffeca089f"
                },
                {
                  "fixed": "cddea0c721106ea480371412d8de21705eb27376"
                },
                {
                  "fixed": "53a0249d68a210c16e961b83adfa82f94ee0a53d"
                },
                {
                  "fixed": "b5f46951e62377b6e406fadc18bc3c5bdf1632a7"
                },
                {
                  "fixed": "9680c58675b82348ab84d387e4fa727f7587e1a0"
                },
                {
                  "fixed": "557c024ca7250bb65ae60f16c02074106c2f197b"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38710.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.26"
                },
                {
                  "fixed": "5.10.258"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.209"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.175"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.134"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "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"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38710.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.517040232Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/076e992752e4b24178918f748d75597c80a408d2",
        "https://git.kernel.org/stable/c/112bb60cd0e254a369e95aa9941a694ffeca089f",
        "https://git.kernel.org/stable/c/366183911b153e9b8cf758e1414e1154d7569337",
        "https://git.kernel.org/stable/c/53a0249d68a210c16e961b83adfa82f94ee0a53d",
        "https://git.kernel.org/stable/c/557c024ca7250bb65ae60f16c02074106c2f197b",
        "https://git.kernel.org/stable/c/9680c58675b82348ab84d387e4fa727f7587e1a0",
        "https://git.kernel.org/stable/c/b5f46951e62377b6e406fadc18bc3c5bdf1632a7",
        "https://git.kernel.org/stable/c/cddea0c721106ea480371412d8de21705eb27376",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38710.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-38710",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38710.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-38710",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 521413,
  "published_at": "2025-09-04T15:33:00.629+00:00"
}