Skip to content
Heist/ feed
High

gfs2: Fix use-after-free in iomap inline data write path

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: gfs2: Fix use-after-free in iomap inline data write path The inline data buffer head (dibh) is being released prematurely in gfs2_iomap_begin() via release_metapath() while iomap->inline_data still points to dibh->b_data. This causes a use-after-free when iomap_write_end_inline() later attempts to write to the inline data area. The bug sequence: 1. gfs2_iomap_begin() calls gfs2_meta_inode_buffer() to read inode metadata into dibh 2. Sets iomap->inline_data = dibh->b_data + sizeof(struct gfs2_dinode) 3. Calls release_metapath() which calls brelse(dibh), dropping refcount to 0 4. kswapd reclaims the page (~39ms later in the syzbot report) 5. iomap_write_end_inline() tries to memcpy() to iomap->inline_data 6. KASAN detects use-after-free write to freed memory Fix by storing dibh in iomap->private and incrementing its refcount with get_bh() in gfs2_iomap_begin(). The buffer is then properly released in gfs2_iomap_end() after the inline write completes, ensuring the page stays alive for the entire iomap operation. Note: A C reproducer is not available for this issue. The fix is based on analysis of the KASAN report and code review showing the buffer head is freed before use. [agruenba: Take buffer head reference in gfs2_iomap_begin() to avoid leaks in gfs2_iomap_get() and gfs2_iomap_alloc().]

Announced Source revision 1
Original source ↗

CVE-2026-45984

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-2026-45984

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": "d0a22a4b03b8475b7aa3fa41243c26c291407844",
        "lessThan": "1403989d1b502f4a2c0d0b42ccf1c25748442eff",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d0a22a4b03b8475b7aa3fa41243c26c291407844",
        "lessThan": "1cae1bafdf9caa9b462b19af06b1a06902e4e142",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d0a22a4b03b8475b7aa3fa41243c26c291407844",
        "lessThan": "764c3c84b5683e608f43735c803a5f415046686c",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d0a22a4b03b8475b7aa3fa41243c26c291407844",
        "lessThan": "d87268326b277af3665237ac76a73dd9fa8e21b4",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d0a22a4b03b8475b7aa3fa41243c26c291407844",
        "lessThan": "87d4954b5c59735a99ea98cb208d47130f6dce7d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d0a22a4b03b8475b7aa3fa41243c26c291407844",
        "lessThan": "6d76febba07c40bcf358f63216d36ea68cf1c215",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d0a22a4b03b8475b7aa3fa41243c26c291407844",
        "lessThan": "815ddd27c0c7171a99fe802fdb19098ddef8b19d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d0a22a4b03b8475b7aa3fa41243c26c291407844",
        "lessThan": "faddeb848305e79db89ee0479bb0e33380656321",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "fs/gfs2/bmap.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "5.2"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "5.2",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "5.10.252",
        "versionType": "semver",
        "lessThanOrEqual": "5.10.*"
      },
      {
        "status": "unaffected",
        "version": "5.15.202",
        "versionType": "semver",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.165",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.128",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.75",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.14",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "6.19.4",
        "versionType": "semver",
        "lessThanOrEqual": "6.19.*"
      },
      {
        "status": "unaffected",
        "version": "7.0",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "fs/gfs2/bmap.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-45984

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

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