Skip to contentSkip to conversation

CVE-2026-99456: scsi: dc395x: sync the waiting_timer before freeing the host

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 19

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

scsi: dc395x: sync the waiting_timer before freeing the host

The waiting_timer callback re-arms itself and takes the host lock. adapter_uninit() currently stops it with timer_delete(), which does not wait for a callback already running on another CPU. The final scsi_host_put() that frees the host (and the host lock the callback dereferences) runs right after adapter_uninit(), so a concurrent or just re-armed callback can fire after the free, leaving a potential use-after-free window.

Replace timer_delete() with timer_shutdown_sync() at the top of adapter_uninit(), before the host-lock section: the timer is dequeued, a running callback is waited for and rearming is blocked before the chip is halted, so it cannot fire at all once the adapter has ceased to function. Waiting outside the lock avoids the self-deadlock that would result from syncing a callback blocked on the lock we still hold.

No shutdown is needed for selto_timer because it has no reachable armer or callback.

This issue was found by an in-house static analysis tool.

The Linux kernel CVE team has assigned CVE-2026-99456 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.117 with commit 0b65c96e51e6aac86f2db251b5bdc5255294a107
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.18.61 with commit a79de0e5e66bd0b69b38c855413a9e3a82926b24
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.3.2 with commit bd04acf9b9d589d93823bfeeea9932cd9ce4ee48
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.4-rc1 with commit 0b1a79f2791a06f139dce5450e487307cf0e241f

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99456

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	drivers/scsi/dc395x.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/0b65c96e51e6aac86f2db251b5bdc5255294a107
	https://git.kernel.org/stable/c/a79de0e5e66bd0b69b38c855413a9e3a82926b24
	https://git.kernel.org/stable/c/bd04acf9b9d589d93823bfeeea9932cd9ce4ee48
	https://git.kernel.org/stable/c/0b1a79f2791a06f139dce5450e487307cf0e241f