Skip to content
Heist/ feed
High

ext4: fix OOB read when checking dotdot dir

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: ext4: fix OOB read when checking dotdot dir Mounting a corrupted filesystem with directory which contains '.' dir entry with rec_len == block size results in out-of-bounds read (later on, when the corrupted directory is removed). ext4_empty_dir() assumes every ext4 directory contains at least '.' and '..' as directory entries in the first data block. It first loads the '.' dir entry, performs sanity checks by calling ext4_check_dir_entry() and then uses its rec_len member to compute the location of '..' dir entry (in ext4_next_entry). It assumes the '..' dir entry fits into the same data block. If the rec_len of '.' is precisely one block (4KB), it slips through the sanity checks (it is considered the last directory entry in the data block) and leaves "struct ext4_dir_entry_2 *de" point exactly past the memory slot allocated to the data block. The following call to ext4_check_dir_entry() on new value of de then dereferences this pointer which results in out-of-bounds mem access. Fix this by extending __ext4_check_dir_entry() to check for '.' dir entries that reach the end of data block. Make sure to ignore the phony dir entries for checksum (by checking name_len for non-zero). Note: This is reported by KASAN as use-after-free in case another structure was recently freed from the slot past the bound, but it is really an OOB read. This issue was found by syzkaller tool. Call Trace: [ 38.594108] BUG: KASAN: slab

Announced Source revision 1
Original source ↗

CVE-2025-37785

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2025-37785

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
        "lessThan": "14da7dbecb430e35b5889da8dae7bef33173b351",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
        "lessThan": "e47f472a664d70a3d104a6c2a035cdff55a719b4",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
        "lessThan": "b7531a4f99c3887439d778afaf418d1a01a5f01b",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
        "lessThan": "89503e5eae64637d0fa2218912b54660effe7d93",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
        "lessThan": "52a5509ab19a5d3afe301165d9b5787bba34d842",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
        "lessThan": "b47584c556444cf7acb66b26a62cbc348eb92b78",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
        "lessThan": "ac28c5684c1cdab650a7e5065b19e91577d37a4b",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
        "lessThan": "53bc45da8d8da92ec07877f5922b130562eb4b00",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
        "lessThan": "d5e206778e96e8667d3bde695ad372c296dc9353",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "fs/ext4/dir.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "2.6.19"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "2.6.19",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "5.4.293",
        "versionType": "semver",
        "lessThanOrEqual": "5.4.*"
      },
      {
        "status": "unaffected",
        "version": "5.10.236",
        "versionType": "semver",
        "lessThanOrEqual": "5.10.*"
      },
      {
        "status": "unaffected",
        "version": "5.15.180",
        "versionType": "semver",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.134",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.87",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.23",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.13.11",
        "versionType": "semver",
        "lessThanOrEqual": "6.13.*"
      },
      {
        "status": "unaffected",
        "version": "6.14.2",
        "versionType": "semver",
        "lessThanOrEqual": "6.14.*"
      },
      {
        "status": "unaffected",
        "version": "6.15",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "fs/ext4/dir.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2025-37785

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#27004 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement