# CVE-2021-47580: linux: In the Linux kernel, the following vulnerability has been resolved:  scsi: scsi_debug: Fix type in min_t to avoid sta...

CVE-2021-47580 is fixed in 39 products on 1 platform, first by RHSA-2022:7683, released November 8, 2022. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2021-47580
- Priority: High
- CVSS: 7.1 (high)
- EPSS: 0.0024
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Nov 8, 2022

## Description

In the Linux kernel, the following vulnerability has been resolved:  scsi: scsi_debug: Fix type in min_t to avoid stack OOB  Change min_t() to use type "u32" instead of type "int" to avoid stack out of bounds. With min_t() type "int" the values get sign extended and the larger value gets used causing stack out of bounds.  BUG: KASAN: stack-out-of-bounds in memcpy include/linux/fortify-string.h:191 [inline] BUG: KASAN: stack-out-of-bounds in sg_copy_buffer+0x1de/0x240 lib/scatterlist.c:976 Read of size 127 at addr ffff888072607128 by task syz-executor.7/18707  CPU: 1 PID: 18707 Comm: syz-executor.7 Not tainted 5.15.0-syzk #1 Hardware name: Red Hat KVM, BIOS 1.13.0-2 Call Trace:  __dump_stack lib/dump_stack.c:88 [inline]  dump_stack_lvl+0x89/0xb5 lib/dump_stack.c:106  print_address_description.constprop.9+0x28/0x160 mm/kasan/report.c:256  __kasan_report mm/kasan/report.c:442 [inline]  kasan_report.cold.14+0x7d/0x117 mm/kasan/report.c:459  check_region_inline mm/kasan/generic.c:183 [inline]  kasan_check_range+0x1a3/0x210 mm/kasan/generic.c:189  memcpy+0x23/0x60 mm/kasan/shadow.c:65  memcpy include/linux/fortify-string.h:191 [inline]  sg_copy_buffer+0x1de/0x240 lib/scatterlist.c:976  sg_copy_from_buffer+0x33/0x40 lib/scatterlist.c:1000  fill_from_dev_buffer.part.34+0x82/0x130 drivers/scsi/scsi_debug.c:1162  fill_from_dev_buffer drivers/scsi/scsi_debug.c:1888 [inline]  resp_readcap16+0x365/0x3b0 drivers/scsi/scsi_debug.c:1887  schedule_resp+0x4d8/0x1a70 drivers/scsi/scsi_debug.c:5478  scsi_debug_queuecommand+0x8c9/0x1ec0 drivers/scsi/scsi_debug.c:7533  scsi_dispatch_cmd drivers/scsi/scsi_lib.c:1520 [inline]  scsi_queue_rq+0x16b0/0x2d40 drivers/scsi/scsi_lib.c:1699  blk_mq_dispatch_rq_list+0xb9b/0x2700 block/blk-mq.c:1639  __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:1761  __blk_mq_delay_run_hw_queue+0x4f8/0x5c0 block/blk-mq.c:1838  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:62  sg_common_write.isra.18+0xeb3/0x2000 drivers/scsi/sg.c:836  sg_new_write.isra.19+0x570/0x8c0 drivers/scsi/sg.c:774  sg_ioctl_common+0x14d6/0x2710 drivers/scsi/sg.c:939  sg_ioctl+0xa2/0x180 drivers/scsi/sg.c:1165  vfs_ioctl fs/ioctl.c:51 [inline]  __do_sys_ioctl fs/ioctl.c:874 [inline]  __se_sys_ioctl fs/ioctl.c:860 [inline]  __x64_sys_ioctl+0x19d/0x220 fs/ioctl.c:860  do_syscall_x64 arch/x86/entry/common.c:50 [inline]  do_syscall_64+0x3a/0x80 arch/x86/entry/common.c:80  entry_SYSCALL_64_after_hwframe+0x44/0xae

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | bpftool RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | bpftool RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-abi-stablelists RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-abi-stablelists RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-core RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-core RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-debug RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-debug RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-debug-core RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-debug-core RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-debug-devel RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-debug-devel RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-debug-devel-matched RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-debug-modules RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-debug-modules RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-debug-modules-extra RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-debug-modules-extra RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-devel RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-devel RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-devel-matched RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-doc RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-doc RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-modules RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-modules RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-modules-extra RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-modules-extra RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-rt RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-core RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-core RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-debug RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-debug RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-debug-core RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-debug-core RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-debug-devel RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-debug-devel RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-debug-kvm RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-debug-kvm RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-debug-modules RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-debug-modules RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-debug-modules-extra RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-debug-modules-extra RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-devel RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-devel RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-kvm RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-kvm RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-modules RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-modules RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-rt-modules-extra RHEL 8 | 0:4.18.0-425.3.1.rt7.213.el8 | [RHSA-2022:7444](https://patchblox.com/security/data/fix/linux/rhsa-2022-7444.md) | Nov 8, 2022 |
| Linux | kernel-rt-modules-extra RHEL 9 | 0:5.14.0-162.6.1.rt21.168.el9_1 | [RHSA-2022:7933](https://patchblox.com/security/data/fix/linux/rhsa-2022-7933.md) | Nov 15, 2022 |
| Linux | kernel-tools RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-tools RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-tools-libs RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-tools-libs RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-tools-libs-devel RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-tools-libs-devel RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-zfcpdump RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-zfcpdump RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-zfcpdump-core RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-zfcpdump-core RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-zfcpdump-devel RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-zfcpdump-devel RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-zfcpdump-devel-matched RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-zfcpdump-modules RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-zfcpdump-modules RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | kernel-zfcpdump-modules-extra RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | kernel-zfcpdump-modules-extra RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | linux Debian 12.15 (bookworm) | 5.15.15-1 | [DEBIAN-CVE-2021-47580](https://patchblox.com/security/data/fix/linux/debian-cve-2021-47580.md) | Jun 19, 2024 |
| Linux | linux Debian 13.5 (trixie) | 5.15.15-1 | [DEBIAN-CVE-2021-47580](https://patchblox.com/security/data/fix/linux/debian-cve-2021-47580.md) | Jun 19, 2024 |
| Linux | linux Debian 14 | 5.15.15-1 | [DEBIAN-CVE-2021-47580](https://patchblox.com/security/data/fix/linux/debian-cve-2021-47580.md) | Jun 19, 2024 |
| Linux | perf RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | perf RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |
| Linux | python3-perf RHEL 8 | 0:4.18.0-425.3.1.el8 | [RHSA-2022:7683](https://patchblox.com/security/data/fix/linux/rhsa-2022-7683.md) | Nov 8, 2022 |
| Linux | python3-perf RHEL 9 | 0:5.14.0-162.6.1.el9_1 | [RHSA-2022:8267](https://patchblox.com/security/data/fix/linux/rhsa-2022-8267.md) | Nov 15, 2022 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
