Vulnerability · Published Oct 21, 2024 · Assigned by Linux
CVE-2024-49863vhost/scsi: null-ptr-dereference in vhost_scsi_get_req()
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 21% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: vhost/scsi: null-ptr-dereference in vhost_scsi_get_req() Since commit 3f8ca2e115e5 ("vhost/scsi: Extract common handling code from control queue handler") a null pointer dereference bug can be triggered when guest sends an SCSI AN request. In vhost_scsi_ctl_handle_vq(), `vc.target` is assigned with `&v_req.tmf.lun[1]` within a switch-case block and is then passed to vhost_scsi_get_req() which extracts `vc->req` and `tpg`. However, for a `VIRTIO_SCSI_T_AN_*` request, tpg is not required, so `vc.target` is set to NULL in this branch. Later, in vhost_scsi_get_req(), `vc->target` is dereferenced without being checked, leading to a null pointer dereference bug. This bug can be triggered from guest. When this bug occurs, the vhost_worker process is killed while holding `vq->mutex` and the corresponding tpg will remain occupied indefinitely. Below is the KASAN report: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 PID: 840 Comm: poc Not tainted 6.10.0+ #1 Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:vhost_scsi_get_req+0x165/0x3a0 Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 2b 02 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b 65 30 4c 89 e2 48 c1 ea 03 <0f> b6 04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 be 01 00 00 RSP: 0018:ffff888017affb50 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff88801b000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888017affcb8 RBP: ffff888017affb80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff888017affc88 R14: ffff888017affd1c R15: ffff888017993000 FS: 000055556e076500(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000200027c0 CR3: 0000000010ed0004 CR4: 0000000000370ef0 Call Trace: <TASK> ? show_regs+0x86/0xa0 ? die_addr+0x4b/0xd0 ? exc_general_protection+0x163/0x260 ? asm_exc_general_protection+0x27/0x30 ? vhost_scsi_get_req+0x165/0x3a0 vhost_scsi_ctl_handle_vq+0x2a4/0xca0 ? __pfx_vhost_scsi_ctl_handle_vq+0x10/0x10 ? __switch_to+0x721/0xeb0 ? __schedule+0xda5/0x5710 ? __kasan_check_write+0x14/0x30 ? _raw_spin_lock+0x82/0xf0 vhost_scsi_ctl_handle_kick+0x52/0x90 vhost_run_work_list+0x134/0x1b0 vhost_task_fn+0x121/0x350 ... </TASK> ---[ end trace 0000000000000000 ]--- Let's add a check in vhost_scsi_get_req. [whitespace fixes]
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.115-1 | DEBIAN-CVE-2024-49863 |
| Debian:13 | linux | 6.11.4-1 | DEBIAN-CVE-2024-49863 |
| Debian:14 | linux | 6.11.4-1 | DEBIAN-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux | 5.15.0-127.137 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux | 6.8.0-54.56 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1073.79 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1023.25 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1023.25~22.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1078.87 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1025.30 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1025.30~22.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1078.87.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1014.15 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1072.80 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1024.26 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1024.26~22.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1070.76 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1019.23 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1056.63 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1006.8 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-57.59~22.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1066.69 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1022.22 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1023.23~22.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1071.77 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1070.75 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-127.137 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-54.56.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-54.56.1~22.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1068.69 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1022.25 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1022.25~22.04.2 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1022.25.2 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1032.32 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1020.20 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1015.15 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1024.24 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1071.77 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1020.21 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1020.21~22.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1066.69 | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1019.23 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-53.55.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-53.55.1~22.04.1 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-49863 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-49863 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1039.43 | UBUNTU-CVE-2024-49863 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 3f8ca2e115e55af4c15d97dda635e948d2e380be – before 6592347f06e2b19a624270a85ad4b3ae48c3b2413f8ca2e115e55af4c15d97dda635e948d2e380be – before 46128370a72c431df733af5ebb065c4d48c9ad393f8ca2e115e55af4c15d97dda635e948d2e380be – before ace9c778a214da9c98d7b69d904d1b0816f4f6813f8ca2e115e55af4c15d97dda635e948d2e380be – before 25613e6d9841a1f9fb985be90df921fa99f800de3f8ca2e115e55af4c15d97dda635e948d2e380be – before 00fb5b23e1c9cdbe496f5cd6b40367cb895f6c933f8ca2e115e55af4c15d97dda635e948d2e380be – before 61517f33e76d2c5247c1e61e668693afe5b67e6f3f8ca2e115e55af4c15d97dda635e948d2e380be – before 221af82f606d928ccef19a16d35633c63026f1be |
| Linux | Linux | 4.20 |
References
- https://git.kernel.org/stable/c/6592347f06e2b19a624270a85ad4b3ae48c3b241
- https://git.kernel.org/stable/c/46128370a72c431df733af5ebb065c4d48c9ad39
- https://git.kernel.org/stable/c/ace9c778a214da9c98d7b69d904d1b0816f4f681
- https://git.kernel.org/stable/c/25613e6d9841a1f9fb985be90df921fa99f800de
- https://git.kernel.org/stable/c/00fb5b23e1c9cdbe496f5cd6b40367cb895f6c93
- https://git.kernel.org/stable/c/61517f33e76d2c5247c1e61e668693afe5b67e6f
- https://git.kernel.org/stable/c/221af82f606d928ccef19a16d35633c63026f1be
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html