Skip to content
Heist/ feed
Back to feed
HighFix available

ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Unlike other strings in the ext4 superblock, we rely on tune2fs to make sure s_mount_opts is NUL terminated. Harden parse_apply_sb_mount_options() by treating s_mount_opts as a potential __nonstring.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.246, 5.4.301, 6.1.158, 6.12.54, 6.17.4, 6.6.114
CVEs
CVE-2025-40198
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 19:35 UTC · Revision 1

Source evidence

ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()

core-osv · Original source

Published 12 Nov 2025, 21:56 UTC

In the Linux kernel, the following vulnerability has been resolved: ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Unlike other strings in the ext4 superblock, we rely on tune2fs to make sure s_mount_opts is NUL terminated. Harden parse_apply_sb_mount_options() by treating s_mount_opts as a potential __nonstring.

osv:CVE-2025-40198

Kernel

Fixed versions: 5.4.301, 5.10.246, 6.1.158, 6.6.114, 6.12.54, 6.17.4

Complete source record
{
  "id": "365e954ba8eb9500f1c01301b79d7a532b153291da13cbff93644d1b5cc259fd",
  "url": "https://osv.dev/vulnerability/CVE-2025-40198",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Unlike other strings in the ext4 superblock, we rely on tune2fs to make sure s_mount_opts is NUL terminated. Harden parse_apply_sb_mount_options() by treating s_mount_opts as a potential __nonstring.",
    "evidence": "osv:CVE-2025-40198",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.4.301",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.246",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.158",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.114",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.54",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.17.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-40198",
      "aliases": [
        "CVE-2025-40198"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/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": "8b67f04ab9de5d8f3a71aef72bf02c995a506db5"
                },
                {
                  "fixed": "7bf46ff83a0ef11836e38ebd72cdc5107209342d"
                },
                {
                  "fixed": "b2bac84fde28fb6a88817b8b761abda17a1d300b"
                },
                {
                  "fixed": "e651294218d2684302ee5ed95ccf381646f3e5b4"
                },
                {
                  "fixed": "01829af7656b56d83682b3491265d583d502e502"
                },
                {
                  "fixed": "2a0cf438320cdb783e0378570744c0ef0d83e934"
                },
                {
                  "fixed": "a6e94557cd05adc82fae0400f6e17745563e5412"
                },
                {
                  "fixed": "8ecb790ea8c3fc69e77bace57f14cf0d7c177bd8"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40198.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.36"
                },
                {
                  "fixed": "5.4.301"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.246"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "6.1.158"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.114"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.54"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.17.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40198.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.543955479Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/01829af7656b56d83682b3491265d583d502e502",
        "https://git.kernel.org/stable/c/2a0cf438320cdb783e0378570744c0ef0d83e934",
        "https://git.kernel.org/stable/c/7bf46ff83a0ef11836e38ebd72cdc5107209342d",
        "https://git.kernel.org/stable/c/8ecb790ea8c3fc69e77bace57f14cf0d7c177bd8",
        "https://git.kernel.org/stable/c/a6e94557cd05adc82fae0400f6e17745563e5412",
        "https://git.kernel.org/stable/c/b2bac84fde28fb6a88817b8b761abda17a1d300b",
        "https://git.kernel.org/stable/c/e651294218d2684302ee5ed95ccf381646f3e5b4",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40198.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-40198",
        "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/40xxx/CVE-2025-40198.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-40198",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 506233,
  "published_at": "2025-11-12T21:56:33.22+00:00"
}