GHSA-565G-F5GR-CM9P

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32
VLAI
Details

In the Linux kernel, the following vulnerability has been resolved:

md/raid5: don't BUG() on an inconsistent reshape state from the superblock

raid5_run() branches on mddev->reshape_position. When it is MaxSector -- no reshape in progress -- the else branch asserts that nothing else describes one:

BUG_ON(mddev->level != mddev->new_level);
BUG_ON(mddev->layout != mddev->new_layout);
BUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors);
BUG_ON(mddev->delta_disks != 0);

Nothing enforces that invariant. Both superblock validators copy the reshape fields straight off disk without cross-checking them against each other: super_1_validate() takes reshape_position, delta_disks, new_level, new_layout and new_chunk from the superblock whenever MD_FEATURE_RESHAPE_ACTIVE is set, and super_90_validate() does the same for minor version 91. A superblock that sets the reshape feature while leaving reshape_position at the MaxSector sentinel therefore reaches the else branch with a non-zero delta_disks, and assembling the array takes the machine down:

kernel BUG at drivers/md/raid5.c:8117! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI RIP: 0010:raid5_run+0x11a7/0x1670 drivers/md/raid5.c:8117 Call Trace: md_run+0xc2f/0x2510 drivers/md/md.c:6779 do_md_run+0x36/0x660 drivers/md/md.c:6880 array_state_store+0x9c5/0xcf0 drivers/md/md.c:4765 md_attr_store+0x1c5/0x330 drivers/md/md.c:6158 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345

This is reachable by anyone who can present an md superblock, so BUG() is the wrong response. Refuse to start the array instead, the way the reshape_position != MaxSector branch a few lines above already refuses a reshape it cannot resume. Nothing has been allocated at this point -- the journal-and-bitmap check just above returns -EINVAL the same way -- so there is nothing to unwind.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-139682"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:19:56Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmd/raid5: don\u0027t BUG() on an inconsistent reshape state from the superblock\n\nraid5_run() branches on mddev-\u003ereshape_position. When it is MaxSector --\nno reshape in progress -- the else branch asserts that nothing else\ndescribes one:\n\n\tBUG_ON(mddev-\u003elevel != mddev-\u003enew_level);\n\tBUG_ON(mddev-\u003elayout != mddev-\u003enew_layout);\n\tBUG_ON(mddev-\u003echunk_sectors != mddev-\u003enew_chunk_sectors);\n\tBUG_ON(mddev-\u003edelta_disks != 0);\n\nNothing enforces that invariant. Both superblock validators copy the\nreshape fields straight off disk without cross-checking them against\neach other: super_1_validate() takes reshape_position, delta_disks,\nnew_level, new_layout and new_chunk from the superblock whenever\nMD_FEATURE_RESHAPE_ACTIVE is set, and super_90_validate() does the same\nfor minor version 91. A superblock that sets the reshape feature while\nleaving reshape_position at the MaxSector sentinel therefore reaches the\nelse branch with a non-zero delta_disks, and assembling the array takes\nthe machine down:\n\n  kernel BUG at drivers/md/raid5.c:8117!\n  Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI\n  RIP: 0010:raid5_run+0x11a7/0x1670 drivers/md/raid5.c:8117\n  Call Trace:\n   md_run+0xc2f/0x2510 drivers/md/md.c:6779\n   do_md_run+0x36/0x660 drivers/md/md.c:6880\n   array_state_store+0x9c5/0xcf0 drivers/md/md.c:4765\n   md_attr_store+0x1c5/0x330 drivers/md/md.c:6158\n   sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145\n   kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345\n\nThis is reachable by anyone who can present an md superblock, so BUG()\nis the wrong response. Refuse to start the array instead, the way the\nreshape_position != MaxSector branch a few lines above already refuses a\nreshape it cannot resume. Nothing has been allocated at this point --\nthe journal-and-bitmap check just above returns -EINVAL the same way --\nso there is nothing to unwind.",
  "id": "GHSA-565g-f5gr-cm9p",
  "modified": "2026-11-30T15:32:41Z",
  "published": "2026-11-30T15:32:41Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139682"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0669c7dbd1d375f279e607a24addc2f1dae2d4f3"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/136a221544d919896a0f1bff8802eb51d0dff496"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/50485f1be262c2085443662b4a8be084fa958b9d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/57926a227a2d610f586b99de2638a02b72e99762"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/996c0df409b1cf2d4e9bb0dce0cb4ba0c1f50ed7"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c093f0dd9119bee681facb5af2efbe476945666c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ef2a78ba818d0cd046c2f1614aebd200a26e01d6"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/fa4122799a5bff6902848eafa00dc8e245ba261f"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

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.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    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.