CVE-2026-99395 (GCVE-0-2026-99395)

Vulnerability from cvelistv5 – Published: 2026-11-19 14:23 – Updated: 2026-11-22 11:08
VLAI
Title
xfs: bound inode fork length against the fork size during log recovery
Summary
In the Linux kernel, the following vulnerability has been resolved: xfs: bound inode fork length against the fork size during log recovery xlog_recover_inode_commit_pass2() copies an inode log item's data/attr fork region into the inode buffer using the on-log region length without bounding it against the fork capacity, e.g.: len = item->ri_buf[2].iov_len; memcpy(XFS_DFORK_DPTR(dip), src, len); The only guard is an ASSERT, which is a no-op on production kernels (CONFIG_XFS_DEBUG off), and xfs_dinode_verify() runs only after the copy. A crafted image with a dirty log can therefore drive a heap out-of-bounds write at mount time. The XFS_ILOG_DBROOT sibling already passes XFS_DFORK_DSIZE as a bound; the DDATA/DEXT and ADATA/AEXT memcpy paths did not. Bound each logged fork region against the destination fork size before copying it, and reject the log item with -EFSCORRUPTED when it does not fit. Because the recovered inode is only verified after the fork data has been copied in, the checks are done up front, before any memcpy into the on-disk inode.
Impacted products
Vendor Product Version
Linux Linux Affected: 658fa68b6f34f73c7e4023489accd34c1db91cb1 , < af559d87fdd921b90c86125f78d8b97d754432dd (git)
Affected: 658fa68b6f34f73c7e4023489accd34c1db91cb1 , < f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe (git)
Affected: 658fa68b6f34f73c7e4023489accd34c1db91cb1 , < e2768e65a5f2f942c831e3df3b06ad7332d423e6 (git)
Affected: 658fa68b6f34f73c7e4023489accd34c1db91cb1 , < 9232301894a06e664d8de2da97175cf98419bd16 (git)
Create a notification for this product.
Linux Linux Affected: 5.8
Unaffected: 0 , < 5.8 (semver)
Unaffected: 6.12.117 , ≤ 6.12.* (semver)
Unaffected: 6.18.61 , ≤ 6.18.* (semver)
Unaffected: 7.3.2 , ≤ 7.3.* (semver)
Unaffected: 7.4-rc1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/xfs/xfs_inode_item_recover.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "af559d87fdd921b90c86125f78d8b97d754432dd",
              "status": "affected",
              "version": "658fa68b6f34f73c7e4023489accd34c1db91cb1",
              "versionType": "git"
            },
            {
              "lessThan": "f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe",
              "status": "affected",
              "version": "658fa68b6f34f73c7e4023489accd34c1db91cb1",
              "versionType": "git"
            },
            {
              "lessThan": "e2768e65a5f2f942c831e3df3b06ad7332d423e6",
              "status": "affected",
              "version": "658fa68b6f34f73c7e4023489accd34c1db91cb1",
              "versionType": "git"
            },
            {
              "lessThan": "9232301894a06e664d8de2da97175cf98419bd16",
              "status": "affected",
              "version": "658fa68b6f34f73c7e4023489accd34c1db91cb1",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/xfs/xfs_inode_item_recover.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.8"
            },
            {
              "lessThan": "5.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.117",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.61",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.117",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.61",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3.2",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.4-rc1",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nxfs: bound inode fork length against the fork size during log recovery\n\nxlog_recover_inode_commit_pass2() copies an inode log item\u0027s data/attr\nfork region into the inode buffer using the on-log region length without\nbounding it against the fork capacity, e.g.:\n\n\tlen = item-\u003eri_buf[2].iov_len;\n\tmemcpy(XFS_DFORK_DPTR(dip), src, len);\n\nThe only guard is an ASSERT, which is a no-op on production kernels\n(CONFIG_XFS_DEBUG off), and xfs_dinode_verify() runs only after the copy.\nA crafted image with a dirty log can therefore drive a heap out-of-bounds\nwrite at mount time. The XFS_ILOG_DBROOT sibling already passes\nXFS_DFORK_DSIZE as a bound; the DDATA/DEXT and ADATA/AEXT memcpy paths\ndid not.\n\nBound each logged fork region against the destination fork size before\ncopying it, and reject the log item with -EFSCORRUPTED when it does not\nfit. Because the recovered inode is only verified after the fork data has\nbeen copied in, the checks are done up front, before any memcpy into the\non-disk inode."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The overflowing bytes are the on-disk log fork region: xlog_recover_add_to_trans records oh_len as ri_buf[].iov_len, and xlog_recover_inode_commit_pass2 copies that length into the inode buffer from xlog_recover pass 2, reached by xfs_log_mount in xfs_fs_fill_super. The log record is image data, not a protocol message.\nAC:L - The attacker sets a dirty log (tail_blk != head_blk), ilf_fields to XFS_ILOG_DDATA, XFS_ILOG_DEXT, XFS_ILOG_ADATA, or XFS_ILOG_AEXT, and an oh_len larger than XFS_DFORK_DSIZE or XFS_DFORK_ASIZE. xlog_recover then hits the memcpy on a normal mount; no race, media fault, or norecovery mount option is involved.\nPR:N - Supplying the image requires no credential. The mount and fsopen paths reach recovery only after mount_capable(), which demands init-namespace CAP_SYS_ADMIN because xfs_fs_type does not set FS_USERNS_MOUNT; that capability is used by the user who performs the mount.\nUI:R - xlog_recover_inode_commit_pass2 is called only from xfs_log_mount during xfs_mountfs in xfs_fs_fill_super. File operations on an already-mounted filesystem cannot inject the oversized log oh_len, so a user has to mount the supplied image.\nS:U - The write corrupts the host kernel\u0027s inode buffer from xfs_buf_alloc_backing_mem and memory adjacent to it. Impact stays in that kernel; XFS is not mountable from a user namespace, and the bug is not a guest-to-host or IOMMU crossing.\nC:H - The memcpy copies attacker-chosen fork bytes for an attacker-chosen iov_len with no production check against XFS_DFORK_DSIZE. A v5 image with a 1024-byte block and ilf_len of one block uses a 1024-byte kmalloc from xfs_buf_alloc_kmem, so a multi-kilobyte oh_len is a controlled heap overflow that can be leveraged to disclose adjacent memory.\nI:H - The DDATA/DEXT memcpy uses ri_buf iov_len with no comparison to XFS_DFORK_DSIZE; the nearby ASSERT only requires len == xlog_calc_iovec_len(ilf_dsize), and ilf_dsize is a uint16 the image sets. The ADATA/AEXT path\u0027s len \u003c= XFS_DFORK_ASIZE check was an ASSERT, absent unless CONFIG_XFS_DEBUG is on.\nA:H - The memcpy runs before xfs_dinode_verify. Writing past the inode buffer corrupts neighboring kernel allocations and oopses or panics the host; returning -EFSCORRUPTED from recovery does not undo the overflow."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-11-22T11:08:03.955Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/af559d87fdd921b90c86125f78d8b97d754432dd"
        },
        {
          "url": "https://git.kernel.org/stable/c/f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe"
        },
        {
          "url": "https://git.kernel.org/stable/c/e2768e65a5f2f942c831e3df3b06ad7332d423e6"
        },
        {
          "url": "https://git.kernel.org/stable/c/9232301894a06e664d8de2da97175cf98419bd16"
        }
      ],
      "title": "xfs: bound inode fork length against the fork size during log recovery",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-99395",
    "datePublished": "2026-11-19T14:23:33.347Z",
    "dateReserved": "2026-09-25T10:25:14.412Z",
    "dateUpdated": "2026-11-22T11:08:03.955Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-99395",
      "date": "2026-11-22",
      "epss": "0.00224",
      "percentile": "0.13164"
    },
    "microsoft_vex": {
      "current_release_date": "2026-11-21T01:06:16.000Z",
      "cve": "CVE-2026-99395",
      "id": "msrc_CVE-2026-99395",
      "initial_release_date": "2026-11-21T01:06:16.000Z",
      "product_status:known_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "xfs: bound inode fork length against the fork size during log recovery",
      "url": "https://msrc.microsoft.com/csaf/vex/2026/msrc_cve-2026-99395.json",
      "version": "1"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "fs/xfs/xfs_inode_item_recover.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "af559d87fdd921b90c86125f78d8b97d754432dd",
                    "status": "affected",
                    "version": "658fa68b6f34f73c7e4023489accd34c1db91cb1",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe",
                    "status": "affected",
                    "version": "658fa68b6f34f73c7e4023489accd34c1db91cb1",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "e2768e65a5f2f942c831e3df3b06ad7332d423e6",
                    "status": "affected",
                    "version": "658fa68b6f34f73c7e4023489accd34c1db91cb1",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "9232301894a06e664d8de2da97175cf98419bd16",
                    "status": "affected",
                    "version": "658fa68b6f34f73c7e4023489accd34c1db91cb1",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "fs/xfs/xfs_inode_item_recover.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "5.8"
                  },
                  {
                    "lessThan": "5.8",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.12.*",
                    "status": "unaffected",
                    "version": "6.12.117",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.18.*",
                    "status": "unaffected",
                    "version": "6.18.61",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "7.3.*",
                    "status": "unaffected",
                    "version": "7.3.2",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "7.4-rc1",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nxfs: bound inode fork length against the fork size during log recovery\n\nxlog_recover_inode_commit_pass2() copies an inode log item\u0027s data/attr\nfork region into the inode buffer using the on-log region length without\nbounding it against the fork capacity, e.g.:\n\n\tlen = item-\u003eri_buf[2].iov_len;\n\tmemcpy(XFS_DFORK_DPTR(dip), src, len);\n\nThe only guard is an ASSERT, which is a no-op on production kernels\n(CONFIG_XFS_DEBUG off), and xfs_dinode_verify() runs only after the copy.\nA crafted image with a dirty log can therefore drive a heap out-of-bounds\nwrite at mount time. The XFS_ILOG_DBROOT sibling already passes\nXFS_DFORK_DSIZE as a bound; the DDATA/DEXT and ADATA/AEXT memcpy paths\ndid not.\n\nBound each logged fork region against the destination fork size before\ncopying it, and reject the log item with -EFSCORRUPTED when it does not\nfit. Because the recovered inode is only verified after the fork data has\nbeen copied in, the checks are done up front, before any memcpy into the\non-disk inode."
          }
        ],
        "id": "CVE-2026-99395",
        "lastModified": "2026-11-22T11:16:50.213",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "REQUIRED",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2026-11-19T15:17:51.913",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/9232301894a06e664d8de2da97175cf98419bd16"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/af559d87fdd921b90c86125f78d8b97d754432dd"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/e2768e65a5f2f942c831e3df3b06ad7332d423e6"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/f2cc5001ffcc1d8e5e16607ce4b6920ea30c2cfe"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Received"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-11-22T11:32:53+00:00",
      "cve": "CVE-2026-99395",
      "id": "CVE-2026-99395",
      "initial_release_date": "2026-11-19T14:23:33.347000+00:00",
      "product_status:known_affected": "162",
      "product_status:known_not_affected": "42",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: kernel: heap out-of-bounds write in XFS during log recovery",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-99395.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-11-21T00:36:23Z",
      "cve": "CVE-2026-99395",
      "id": "CVE-2026-99395",
      "initial_release_date": "2026-11-21T00:36:23Z",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-99395",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/2026/cve-2026-99395.json",
      "version": "2"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…