GHSA-7Q46-C2Q3-8GFF

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: don't hand out the array before md_alloc() has added mddev->kobj

md_alloc() publishes the gendisk before it is done setting the mddev up:

disk->private_data = mddev;
...
error = add_disk(disk);
if (error)
    goto out_put_disk;

kobject_init(&mddev->kobj, &md_ktype);
error = kobject_add(&mddev->kobj, &disk_to_dev(disk)->kobj, "%s", "md");

add_disk() makes /dev/mdN openable. mddev comes from mddev_alloc() and is zeroed, so anything that gets in between add_disk() and kobject_add() sees an mddev->kobj that has never been through kobject_init() - no ktype, no kref, state_initialized clear.

syzbot opens the array in that window and issues ADD_NEW_DISK:

kobject: '(null)' (ffff8880120640f0): is not initialized, yet kobject_get() is being called. WARNING: lib/kobject.c:642 at kobject_add_internal+0xea/0xcd0 lib/kobject.c:225 kobject_add_varg lib/kobject.c:374 [inline] kobject_add+0x163/0x240 lib/kobject.c:426 bind_rdev_to_array+0x80c/0xdd0 drivers/md/md.c:2621 md_add_new_disk+0xe3b/0x1850 drivers/md/md.c:7684 md_ioctl+0x200a/0x2610 drivers/md/md.c:8499

bind_rdev_to_array() is not the only way in. md_run() calls sysfs_create_group(&mddev->kobj, &md_redundancy_group), and internal_create_group() has its own WARN_ON(!kobj->sd), so RUN_ARRAY in the same window warns too.

Every ioctl that can reach mddev->kobj runs under reconfig_mutex, so hold it across add_disk() and kobject_add(). An ioctl issued in the window now waits for md_alloc() to finish instead of seeing a half-built mddev, and opening the array still succeeds. The ioctls md_ioctl() serves without the mutex only read array state and return -ENODEV on an array with no disks.

Hoisting kobject_init() above add_disk() is not an option: commit ca39f7502425 ("md: fix mddev->kobj lifetime") moved it below add_disk() so that md_alloc()'s error paths, which free the mddev directly, never see an initialised kobject.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-138869"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:17:43Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmd: don\u0027t hand out the array before md_alloc() has added mddev-\u003ekobj\n\nmd_alloc() publishes the gendisk before it is done setting the mddev up:\n\n\tdisk-\u003eprivate_data = mddev;\n\t...\n\terror = add_disk(disk);\n\tif (error)\n\t\tgoto out_put_disk;\n\n\tkobject_init(\u0026mddev-\u003ekobj, \u0026md_ktype);\n\terror = kobject_add(\u0026mddev-\u003ekobj, \u0026disk_to_dev(disk)-\u003ekobj, \"%s\", \"md\");\n\nadd_disk() makes /dev/mdN openable.  mddev comes from mddev_alloc() and\nis zeroed, so anything that gets in between add_disk() and kobject_add()\nsees an mddev-\u003ekobj that has never been through kobject_init() - no\nktype, no kref, state_initialized clear.\n\nsyzbot opens the array in that window and issues ADD_NEW_DISK:\n\n  kobject: \u0027(null)\u0027 (ffff8880120640f0): is not initialized, yet\n  kobject_get() is being called.\n  WARNING: lib/kobject.c:642 at kobject_add_internal+0xea/0xcd0 lib/kobject.c:225\n   kobject_add_varg lib/kobject.c:374 [inline]\n   kobject_add+0x163/0x240 lib/kobject.c:426\n   bind_rdev_to_array+0x80c/0xdd0 drivers/md/md.c:2621\n   md_add_new_disk+0xe3b/0x1850 drivers/md/md.c:7684\n   md_ioctl+0x200a/0x2610 drivers/md/md.c:8499\n\nbind_rdev_to_array() is not the only way in.  md_run() calls\nsysfs_create_group(\u0026mddev-\u003ekobj, \u0026md_redundancy_group), and\ninternal_create_group() has its own WARN_ON(!kobj-\u003esd), so RUN_ARRAY in\nthe same window warns too.\n\nEvery ioctl that can reach mddev-\u003ekobj runs under reconfig_mutex, so\nhold it across add_disk() and kobject_add().  An ioctl issued in the\nwindow now waits for md_alloc() to finish instead of seeing a\nhalf-built mddev, and opening the array still succeeds.  The ioctls\nmd_ioctl() serves without the mutex only read array state and return\n-ENODEV on an array with no disks.\n\nHoisting kobject_init() above add_disk() is not an option: commit\nca39f7502425 (\"md: fix mddev-\u003ekobj lifetime\") moved it below add_disk()\nso that md_alloc()\u0027s error paths, which free the mddev directly, never\nsee an initialised kobject.",
  "id": "GHSA-7q46-c2q3-8gff",
  "modified": "2026-11-30T15:32:07Z",
  "published": "2026-11-30T15:32:07Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138869"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/147a2a108156ca807b6ffc823faf1804cd6a11c5"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/49f6bd347a7b7da90aabc213b58eec620c295d64"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/87651ed2b269bf62879a61b461aae4286e1ae1ed"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/8b4800ff31c956d4f4bd45b371e5b9e733a95401"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c07902b838145371d5c6d49b1be8a49ace387c06"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d1472ca2ca5de8ecd2b358411eb14c031404ecf0"
    }
  ],
  "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.