CVE-2026-99156: scsi: st: Fix use-after-free race between st_remove() and st_open()

Published Oct 28, 2026
·
Updated

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

scsi: st: Fix use-after-free race between stremove() and stopen()

stremove() drops the probe reference on the scsitape with krefput() and only afterwards removes its index from stindexidr. If that was the last reference, scsitaperelease() frees the structure while it is still published in the idr.

scsitapeget(), called from stopen(), looks up the tape in stindexidr and takes a reference under strefmutex and stindexlock. removecdevs() does not wait for opens that are already past chrdevopen(), so an open that is blocked on strefmutex while stremove() holds it can take the mutex as soon as stremove() drops it, find the freed tpnt in the idr and call krefget() on it:

BUG: KASAN: slab-use-after-free in stopen Write of size 4 ... stopen (drivers/scsi/st.c:254 drivers/scsi/st.c:1291) chrdevopen ... Freed by task ...: kfree stremove (drivers/scsi/st.c:4512)

Remove the index from the idr before dropping the reference, all under strefmutex. A concurrent scsitapeget() now either runs first and holds a valid reference that keeps the tape alive, or runs afterwards and finds nothing, so stopen() fails with -ENXIO.

This restores the ordering stremove() had before the conversion to stindexidr, where the tape was unpublished from scsitapes[] before the final krefput().

Affected Software

1 affected component
Linux Linux kernel

Event History

Oct 28, 2026
CVE Published
via MITRE·10:35 AM
Data Sourced
via MITRE·10:35 AM
Description
Data Sourced
via NVD·11:17 AM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203