KernelScan.io

HIGH Introduced in 3.7

st IndexIdr UAF

CVE-2026-99156

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.1HIGH

01

In the Linux kernel, the following vulnerability has been resolved: scsi: st: Fix use-after-free race between st_remove() and st_open() st_remove() drops the probe reference on the scsi_tape with kref_put() and only afterwards removes its index from st_index_idr. If that was the last reference, scsi_tape_release() frees the structure while it is still published in the idr. scsi_tape_get(), called from st_open(), looks up the tape in st_index_idr and takes a reference under st_ref_mutex and st_index_lock. remove_cdevs() does not wait for opens that are already past chrdev_open(), so an open that is blocked on st_ref_mutex while st_remove() holds it can take the mutex as soon as st_remove() drops it, find the freed tpnt in the idr and call kref_get() on it: BUG: KASAN: slab-use-after-free in st_open Write of size 4 ... st_open (drivers/scsi/st.c:254 drivers/scsi/st.c:1291) chrdev_open ... Freed by task ...: kfree st_remove (drivers/scsi/st.c:4512) Remove the index from the idr before dropping the reference, all under st_ref_mutex. A concurrent scsi_tape_get() now either runs first and holds a valid reference that keeps the tape alive, or runs afterwards and finds nothing, so st_open() fails with -ENXIO. This restores the ordering st_remove() had before the conversion to st_index_idr, where the tape was unpublished from scsi_tapes[] before the final kref_put().

02

Engine v0.9.0

Risk summary

A local user with access to a SCSI tape device (/dev/st*) can race a device removal operation to trigger a use-after-free in the kernel. This can lead to kernel panic (denial of service) or potentially be exploited for privilege escalation. Systems with SCSI tape drives attached and accessible to non-root users are at risk.

Affecteddrivers/scsi/st.c (SCSI tape driver)

Vulnerability analysis

The SCSI tape driver's device removal sequence released the last reference to a tape device before removing it from the internal lookup table. This created a race window where a concurrent open operation could locate the already-freed device in the table and attempt to use it, resulting in a use-after-free. The fix changes the removal order so the device is removed from the lookup table while its reference is still held, guaranteeing that any open either finds a valid device or fails cleanly. The flaw requires local access to the tape device file and the ability to race against a device removal (normally triggered by an administrator or physical disconnection), making it a local privilege escalation or denial-of-service issue.

03

BranchIntroducedFixed inPatch commit
5.103.75.10.2737d7f9d2ee4b0
5.153.75.15.224d9517fc39ec3
6.13.76.1.191e7a5da4a4820
6.123.76.12.1155ef230f734e0
6.183.76.18.59a1647b653549
6.63.76.6.16100ff1128123d
7.23.77.2.1318a0e3733ce3
mainline3.77.371caf7f84bd6

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Affected — no CIP fix yet (latest 6.12.114-cip34)
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip115)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)