# CVE-2021-47576: scsi: scsi\_debug: Sanity check block descriptor length in resp\_mode\_select()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-06-19T14:53:44.725Z
- **Modified:** 2026-08-05T08:48:26.375Z

## Who should check

- Anyone running Linux \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< adcecd50da6cab7b4957cba0606771dcc846c5a9; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< 90491283b4064220682e4b0687d07b05df01e3bf; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< 04181973c38f3d6a353f9246dcf7fee08024fd9e; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< b847ecff850719c46c95acd25a0d555dfd16e10d; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< a9078e791426c2cbbdf28a320c3670f6e0a611e6; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< dfc3fff63793c571147930b13c0f8c689c4281ac; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< e0a2c28da11e2c2b963fc01d50acbf03045ac732
- Anyone running Linux 2.6.19

## Description

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

scsi: scsi\_debug: Sanity check block descriptor length in resp\_mode\_select()

In resp\_mode\_select() sanity check the block descriptor len to avoid UAF.

BUG: KASAN: use-after-free in resp\_mode\_select+0xa4c/0xb40 drivers/scsi/scsi\_debug.c:2509
Read of size 1 at addr ffff888026670f50 by task scsicmd/15032

CPU: 1 PID: 15032 Comm: scsicmd Not tainted 5.15.0-01d0625 \#15
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
Call Trace:
 \<TASK\>
 dump\_stack\_lvl+0x89/0xb5 lib/dump\_stack.c:107
 print\_address\_description.constprop.9+0x28/0x160 mm/kasan/report.c:257
 kasan\_report.cold.14+0x7d/0x117 mm/kasan/report.c:443
 \_\_asan\_report\_load1\_noabort+0x14/0x20 mm/kasan/report\_generic.c:306
 resp\_mode\_select+0xa4c/0xb40 drivers/scsi/scsi\_debug.c:2509
 schedule\_resp+0x4af/0x1a10 drivers/scsi/scsi\_debug.c:5483
 scsi\_debug\_queuecommand+0x8c9/0x1e70 drivers/scsi/scsi\_debug.c:7537
 scsi\_queue\_rq+0x16b4/0x2d10 drivers/scsi/scsi\_lib.c:1521
 blk\_mq\_dispatch\_rq\_list+0xb9b/0x2700 block/blk-mq.c:1640
 \_\_blk\_mq\_sched\_dispatch\_requests+0x28f/0x590 block/blk-mq-sched.c:325
 blk\_mq\_sched\_dispatch\_requests+0x105/0x190 block/blk-mq-sched.c:358
 \_\_blk\_mq\_run\_hw\_queue+0xe5/0x150 block/blk-mq.c:1762
 \_\_blk\_mq\_delay\_run\_hw\_queue+0x4f8/0x5c0 block/blk-mq.c:1839
 blk\_mq\_run\_hw\_queue+0x18d/0x350 block/blk-mq.c:1891
 blk\_mq\_sched\_insert\_request+0x3db/0x4e0 block/blk-mq-sched.c:474
 blk\_execute\_rq\_nowait+0x16b/0x1c0 block/blk-exec.c:63
 sg\_common\_write.isra.18+0xeb3/0x2000 drivers/scsi/sg.c:837
 sg\_new\_write.isra.19+0x570/0x8c0 drivers/scsi/sg.c:775
 sg\_ioctl\_common+0x14d6/0x2710 drivers/scsi/sg.c:941
 sg\_ioctl+0xa2/0x180 drivers/scsi/sg.c:1166
 \_\_x64\_sys\_ioctl+0x19d/0x220 fs/ioctl.c:52
 do\_syscall\_64+0x3a/0x80 arch/x86/entry/common.c:50
 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae arch/x86/entry/entry\_64.S:113

## Affected and fixed versions

- Linux: \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< adcecd50da6cab7b4957cba0606771dcc846c5a9; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< 90491283b4064220682e4b0687d07b05df01e3bf; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< 04181973c38f3d6a353f9246dcf7fee08024fd9e; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< b847ecff850719c46c95acd25a0d555dfd16e10d; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< a9078e791426c2cbbdf28a320c3670f6e0a611e6; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< dfc3fff63793c571147930b13c0f8c689c4281ac; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< e0a2c28da11e2c2b963fc01d50acbf03045ac732 (cvelist)
- Linux: 2.6.19 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47576. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47576.md
Affected: Linux >= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, < adcecd50da6cab7b4957cba0606771dcc846c5a9; >= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, < 90491283b4064220682e4b0687d07b05df01e3bf; >= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, < 04181973c38f3d6a353f9246dcf7fee08024fd9e; >= 231839102b54512ced7d3ee…
Fixed in: Linux 90491283b4064220682e4b0687d07b05df01e3bf, Linux 04181973c38f3d6a353f9246dcf7fee08024fd9e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47576 being exploited?

There is no confirmed exploitation: CVE-2021-47576 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47576?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47576?

Linux \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< adcecd50da6cab7b4957cba0606771dcc846c5a9; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< 90491283b4064220682e4b0687d07b05df01e3bf; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< 04181973c38f3d6a353f9246dcf7fee08024fd9e; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< b847ecff850719c46c95acd25a0d555dfd16e10d; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< a9078e791426c2cbbdf28a320c3670f6e0a611e6; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< dfc3fff63793c571147930b13c0f8c689c4281ac; \>= 231839102b54512ced7d3ee7fc9b8bcf5e3b583b, \< e0a2c28da11e2c2b963fc01d50acbf03045ac732; Linux 2.6.19.

### Is there a fix for CVE-2021-47576?

Yes. Fixed in Linux 90491283b4064220682e4b0687d07b05df01e3bf, Linux 04181973c38f3d6a353f9246dcf7fee08024fd9e. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2021-47576?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/adcecd50da6cab7b4957cba0606771dcc846c5a9>
- patch: <https://git.kernel.org/stable/c/90491283b4064220682e4b0687d07b05df01e3bf>
- patch: <https://git.kernel.org/stable/c/04181973c38f3d6a353f9246dcf7fee08024fd9e>
- patch: <https://git.kernel.org/stable/c/b847ecff850719c46c95acd25a0d555dfd16e10d>
- patch: <https://git.kernel.org/stable/c/a9078e791426c2cbbdf28a320c3670f6e0a611e6>
- patch: <https://git.kernel.org/stable/c/dfc3fff63793c571147930b13c0f8c689c4281ac>
- patch: <https://git.kernel.org/stable/c/e0a2c28da11e2c2b963fc01d50acbf03045ac732>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47576>

HTML: <https://flawdb.com/CVE-2021-47576> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47576>
