{"id":"CVE-2026-138869","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:17:43.580","lastModified":"2026-11-30T14:17:43.580","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd: don't hand out the array before md_alloc() has added mddev->kobj\n\nmd_alloc() publishes the gendisk before it is done setting the mddev up:\n\n\tdisk->private_data = mddev;\n\t...\n\terror = add_disk(disk);\n\tif (error)\n\t\tgoto out_put_disk;\n\n\tkobject_init(&mddev->kobj, &md_ktype);\n\terror = kobject_add(&mddev->kobj, &disk_to_dev(disk)->kobj, \"%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->kobj 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: '(null)' (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(&mddev->kobj, &md_redundancy_group), and\ninternal_create_group() has its own WARN_ON(!kobj->sd), so RUN_ARRAY in\nthe same window warns too.\n\nEvery ioctl that can reach mddev->kobj 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->kobj lifetime\") moved it below add_disk()\nso that md_alloc()'s error paths, which free the mddev directly, never\nsee an initialised kobject."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/md/md.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"ca39f7502425d437cbf83d29d99b43bd61342858","lessThan":"c07902b838145371d5c6d49b1be8a49ace387c06","versionType":"git","status":"affected"},{"version":"ca39f7502425d437cbf83d29d99b43bd61342858","lessThan":"87651ed2b269bf62879a61b461aae4286e1ae1ed","versionType":"git","status":"affected"},{"version":"ca39f7502425d437cbf83d29d99b43bd61342858","lessThan":"8b4800ff31c956d4f4bd45b371e5b9e733a95401","versionType":"git","status":"affected"},{"version":"ca39f7502425d437cbf83d29d99b43bd61342858","lessThan":"49f6bd347a7b7da90aabc213b58eec620c295d64","versionType":"git","status":"affected"},{"version":"ca39f7502425d437cbf83d29d99b43bd61342858","lessThan":"147a2a108156ca807b6ffc823faf1804cd6a11c5","versionType":"git","status":"affected"},{"version":"ca39f7502425d437cbf83d29d99b43bd61342858","lessThan":"d1472ca2ca5de8ecd2b358411eb14c031404ecf0","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/md/md.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.0","status":"affected"},{"version":"0","lessThan":"6.0","versionType":"semver","status":"unaffected"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","versionType":"semver","status":"unaffected"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","versionType":"semver","status":"unaffected"},{"version":"6.12.117","lessThanOrEqual":"6.12.*","versionType":"semver","status":"unaffected"},{"version":"6.18.63","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/147a2a108156ca807b6ffc823faf1804cd6a11c5","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/49f6bd347a7b7da90aabc213b58eec620c295d64","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/87651ed2b269bf62879a61b461aae4286e1ae1ed","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/8b4800ff31c956d4f4bd45b371e5b9e733a95401","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/c07902b838145371d5c6d49b1be8a49ace387c06","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/d1472ca2ca5de8ecd2b358411eb14c031404ecf0","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}