{"id":"CVE-2026-99156","kind":"vulnerability","aliases":["CVE-2026-99156"],"related":[],"title":"Linux kernel SCSI tape driver: use-after-free when opening a removed tape","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: st: Fix use-after-free race between st_remove() and st_open()\n\nst_remove() drops the probe reference on the scsi_tape with kref_put()\nand only afterwards removes its index from st_index_idr. If that was the\nlast reference, scsi_tape_release() frees the structure while it is\nstill published in the idr.\n\nscsi_tape_get(), called from st_open(), looks up the tape in\nst_index_idr and takes a reference under st_ref_mutex and\nst_index_lock. remove_cdevs() does not wait for opens that are already\npast chrdev_open(), so an open that is blocked on st_ref_mutex while\nst_remove() holds it can take the mutex as soon as st_remove() drops it,\nfind the freed tpnt in the idr and call kref_get() on it:\n\n  BUG: KASAN: slab-use-after-free in st_open\n  Write of size 4 ...\n   st_open (drivers/scsi/st.c:254 drivers/scsi/st.c:1291)\n   chrdev_open\n  ...\n  Freed by task ...:\n   kfree\n   st_remove (drivers/scsi/st.c:4512)\n\nRemove the index from the idr before dropping the reference, all under\nst_ref_mutex. A concurrent scsi_tape_get() now either runs first and\nholds a valid reference that keeps the tape alive, or runs afterwards\nand finds nothing, so st_open() fails with -ENXIO.\n\nThis restores the ordering st_remove() had before the conversion to\nst_index_idr, where the tape was unpublished from scsi_tapes[] before\nthe final kref_put().","summary":"In the Linux kernel SCSI tape driver (st), a race between device removal and opening lets a process open a tape device whose structure was already freed. The sources describe this as a use-after-free, which can corrupt memory; the sources do not state a privilege or impact level.","severity":"unknown","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["linux-kernel","runtime","scsi-tape"],"not_affected_if":["no-scsi-tape-drive"],"how_to_check":"- unknown","fix":"- Install a Linux kernel release that includes the upstream commit 'scsi: st: Fix use-after-free race between st_remove() and st_open()'; the sources do not name a version.","status":"open","published_at":"2026-10-28T11:17:35+00:00","first_seen_at":"2026-10-28T11:32:36+00:00","triaged_at":"2026-10-28T11:35:49+00:00","updated_at":"2026-10-28T11:35:49+00:00","category":"runtime","confidence":0.5,"triage":{"at":"2026-10-28T11:35:49Z","model":"claude-haiku-5-5","output":{"fix":"- Install a Linux kernel release that includes the upstream commit 'scsi: st: Fix use-after-free race between st_remove() and st_open()'; the sources do not name a version.","reach":"local","title":"Linux kernel SCSI tape driver: use-after-free when opening a removed tape","impact":"medium","summary":"In the Linux kernel SCSI tape driver (st), a race between device removal and opening lets a process open a tape device whose structure was already freed. The sources describe this as a use-after-free, which can corrupt memory; the sources do not state a privilege or impact level.","category":"runtime","nicknames":[],"who_cares":["linux-kernel","scsi-tape"],"confidence":0.5,"needs_auth":"unknown","worst_case":"unknown; memory corruption in the kernel is possible","analyst_note":"Check the NVD entry and the upstream kernel commit for affected version ranges and the fixed stable release.","how_to_check":"- unknown","needs_analyst":true,"not_affected_if":["no-scsi-tape-drive"],"who_is_affected":"Systems running a Linux kernel with the SCSI tape driver (st) and tape devices that can be removed while being opened. The sources do not say how exposed a typical server is.","user_interaction":"unknown","needs_special_setup":"unknown","severity_if_unknown":"unknown"},"cost_usd":0.000612,"input_tokens":3765,"output_tokens":471,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-2026':16A,19A '-99156':17A,20A '1291':244C '254':242C '4':238C '4512':254C 'afterward':118C,291C 'aliv':288C 'alreadi':53B,182C 'block':191C 'bug':225C 'call':149C,220C 'cdev':174C 'chrdev':184C,245C 'concurr':271C 'convers':310C 'corrupt':67B 'cve':15A,18A 'describ':57B 'devic':39B,49B 'driver':5A,34B 'drivers/scsi/st.c':241C,243C,253C 'drop':105C,210C,262C 'either':276C 'enxio':300C 'fail':298C 'final':325C 'find':212C,293C 'first':278C 'fix':91C 'follow':84C 'free':9A,64B,95C,135C,231C 'freed':54B,214C,247C 'get':148C,222C,274C 'hold':199C,280C 'idr':125C,145C,160C,218C,260C,314C 'impact':77B 'index':121C,124C,159C,171C,257C,313C 'kasan':226C 'keep':285C 'kernel':2A,23B,31B,82C 'kfree':250C 'kref':114C,221C,326C 'last':130C 'let':43B 'level':78B 'linux':1A,22B,30B,81C 'linux-kernel':21B 'lock':172C 'look':153C 'memori':68B 'mutex':168C,195C,204C,269C 'noth':294C 'open':11A,42B,46B,102C,152C,179C,185C,188C,234C,240C,246C,297C 'order':304C 'past':183C 'privileg':75B 'probe':107C 'process':45B 'publish':142C 'put':115C,327C 'race':37B,96C 'ref':167C,194C,268C 'refer':108C,131C,164C,264C,283C 'releas':134C 'remov':13A,40B,99C,104C,119C,173C,198C,209C,252C,255C,306C 'resolv':88C 'restor':302C 'run':277C,290C 'runtim':24B 'scsi':3A,26B,32B,89C,111C,132C,146C,272C,321C 'scsi-tap':25B 'size':237C 'slab':228C 'slab-use-after-fre':227C 'soon':206C 'sourc':56B,70B 'st':35B,90C,98C,101C,103C,123C,151C,158C,166C,170C,193C,197C,208C,233C,239C,251C,267C,296C,305C,312C 'state':73B 'still':141C 'structur':51B,137C 'take':162C,202C 'tape':4A,14A,27B,33B,48B,112C,133C,147C,156C,273C,287C,317C,322C 'task':249C 'tpnt':215C 'unpublish':319C 'use':7A,62B,93C,229C 'use-after-fre':6A,61B,92C 'valid':282C 'vulner':85C 'wait':177C 'whose':50B 'write':235C","nicknames":[],"mitigations":[],"who_affected":"Systems running a Linux kernel with the SCSI tape driver (st) and tape devices that can be removed while being opened. The sources do not say how exposed a typical server is.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-28T11:17:35+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-99156","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99156","severity":null,"published_at":"2026-10-28T11:17:35+00:00","modified_at":"2026-10-28T11:17:35+00:00","first_seen_at":"2026-10-28T11:32:36+00:00","fetched_at":"2026-10-28T11:32:36+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}