PT-2026-162729
CVE-2026-138869
·
Publicado
2026-11-30
·
Atualizado
2026-11-30
Descrição por
Pontuação
N/A
Não disponívelNão há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.
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.
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾