AZL-117397: CVE-2026-99934 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
scsi: sd: Mark the disk dead if runtime resume fails in sdremove()
If a SCSI disk is unplugged while runtime suspended, its request queue is still in the pm-only state when sdremove() is called. The runtime resume attempted by scsiautopmgetdevice() fails because the parent device, e.g. a USB device in the USBSTATENOTATTACHED state, cannot be resumed. Hence, sdevruntimeresume() is not called and the pm-only state is not cleared. Next, delgendisk() calls blkreportdiskdead(disk, false), which calls syncfilesystem(). Any bio submitted by the filesystem waits forever in bioqueueenter() because the queue will never leave the pm-only state and because GDDEAD has not yet been set:
bioqueueenter+0xb8/0x174 blkmqsubmitbio+0x640/0x7e4 [ ... ] exfatsyncfs+0xa4/0xe0 syncfilesystem+0xa8/0xdc fsbdevmarkdead+0x30/0x88 bdevmarkdead+0x54/0xc4 blkreportdiskdead+0x8c/0xd4 delgendisk+0xa0/0x2f8 sdremove+0x30/0x60 [ ... ] scsiremovehost+0x88/0x18c usbstordisconnect+0x68/0xf4
Fix this hang by calling blkmarkdiskdead() if runtime resume fails. This sets GDDEAD, tells the filesystem that the disk has been removed without attempting to sync it, and wakes up any bios that are waiting in bioqueueenter(). Syncing the filesystem is not possible anyway if runtime resume failed, so no data is lost that could otherwise have been written. If runtime resume succeeds, behavior is not changed.
Please note that this patch converts temporary runtime resume failures into permanent failures. Before this patch, if runtime resume fails temporarily, a filesytem sync would be postponed until a later resume succeeds.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the Linux kernel SCSI sd_remove() path, call blk_mark_disk_dead() if runtime resume fails.
Event History
Frequently Asked Questions
What conditions are required to trigger the hang?
A SCSI disk must be unplugged while it is runtime suspended. During removal, runtime resume must then fail because the parent device cannot be resumed, such as a USB device in the USB_STATE_NOTATTACHED state.
What is the operational impact?
Filesystem I/O can wait indefinitely because the disk request queue remains in the pm-only state while the disk has not yet been marked dead. The described call path occurs during disk removal and can involve USB storage disconnect handling.
What change resolves the issue?
The fix marks the disk dead when runtime resume fails during sd_remove(). Setting GD_DEAD prevents submitted bios from waiting forever for a request queue that will never leave the pm-only state.