Vulnerability · Published Jul 12, 2024 · Assigned by Linux
CVE-2024-40978scsi: qedi: Fix crash while reading debugfs attribute
High 7.1
In plain English
A high-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 25% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: scsi: qedi: Fix crash while reading debugfs attribute The qedi_dbg_do_not_recover_cmd_read() function invokes sprintf() directly on a __user pointer, which results into the crash. To fix this issue, use a small local stack buffer for sprintf() and then call simple_read_from_buffer(), which in turns make the copy_to_user() call. BUG: unable to handle page fault for address: 00007f4801111000 PGD 8000000864df6067 P4D 8000000864df6067 PUD 864df7067 PMD 846028067 PTE 0 Oops: 0002 [#1] PREEMPT SMP PTI Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 06/15/2023 RIP: 0010:memcpy_orig+0xcd/0x130 RSP: 0018:ffffb7a18c3ffc40 EFLAGS: 00010202 RAX: 00007f4801111000 RBX: 00007f4801111000 RCX: 000000000000000f RDX: 000000000000000f RSI: ffffffffc0bfd7a0 RDI: 00007f4801111000 RBP: ffffffffc0bfd7a0 R08: 725f746f6e5f6f64 R09: 3d7265766f636572 R10: ffffb7a18c3ffd08 R11: 0000000000000000 R12: 00007f4881110fff R13: 000000007fffffff R14: ffffb7a18c3ffca0 R15: ffffffffc0bfd7af FS: 00007f480118a740(0000) GS:ffff98e38af00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4801111000 CR3: 0000000864b8e001 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: <TASK> ? __die_body+0x1a/0x60 ? page_fault_oops+0x183/0x510 ? exc_page_fault+0x69/0x150 ? asm_exc_page_fault+0x22/0x30 ? memcpy_orig+0xcd/0x130 vsnprintf+0x102/0x4c0 sprintf+0x51/0x80 qedi_dbg_do_not_recover_cmd_read+0x2f/0x50 [qedi 6bcfdeeecdea037da47069eca2ba717c84a77324] full_proxy_read+0x50/0x80 vfs_read+0xa5/0x2e0 ? folio_add_new_anon_rmap+0x44/0xa0 ? set_pte_at+0x15/0x30 ? do_pte_missing+0x426/0x7f0 ksys_read+0xa5/0xe0 do_syscall_64+0x58/0x80 ? __count_memcg_events+0x46/0x90 ? count_memcg_event_mm+0x3d/0x60 ? handle_mm_fault+0x196/0x2f0 ? do_user_addr_fault+0x267/0x890 ? exc_page_fault+0x69/0x150 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f4800f20b4d
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | bpftool | 7.3.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-debug | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-debug-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-debug-devel | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-debug-devel-matched | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-debug-modules | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-debug-modules-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-debug-modules-extra | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-devel | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-devel-matched | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-modules | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-modules-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-64k-modules-extra | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-abi-stablelists | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-cross-headers | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-debug | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-debug-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-debug-devel | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-debug-devel-matched | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-debug-modules | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-debug-modules-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-debug-modules-extra | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-debug-uki-virt | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-devel | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-devel-matched | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-doc | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-headers | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-modules | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-modules-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-modules-extra | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-debug | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-debug-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-debug-devel | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-debug-modules | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-debug-modules-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-debug-modules-extra | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-devel | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-modules | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-modules-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-rt-modules-extra | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-tools | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-tools-libs | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-tools-libs-devel | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-uki-virt | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-zfcpdump | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-zfcpdump-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-zfcpdump-devel | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-zfcpdump-devel-matched | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-zfcpdump-modules | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-zfcpdump-modules-core | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | kernel-zfcpdump-modules-extra | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | libperf | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | perf | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | python3-perf | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | rtla | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| AlmaLinux:9 | rv | 5.14.0-427.33.1.el9_4 | ALSA-2024:5928 |
| Debian:12 | linux | 6.1.99-1 | DEBIAN-CVE-2024-40978 |
| Debian:13 | linux | 6.9.7-1 | DEBIAN-CVE-2024-40978 |
| Debian:14 | linux | 6.9.7-1 | DEBIAN-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux | 5.15.0-121.131 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux | 6.8.0-44.44 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1069.75 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1015.16 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1015.16~22.04.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1072.81 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1014.16 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1072.81.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1068.76 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1014.16 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1066.72 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1010.13 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1052.59 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-45.45~22.04.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1062.65 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1012.12 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1064.70 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1066.71 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-121.131 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-44.44.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1064.65 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1013.14 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1013.14.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1028.28 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1016.16 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1012.12 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1067.73 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1012.12 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1062.65 | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1011.12 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-44.44.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-40978 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1035.39 | UBUNTU-CVE-2024-40978 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | ace7f46ba5fde7273207c7122b0650ceb72510e0 – before 56bec63a7fc87ad50b3373a87517dc9770eef9e0ace7f46ba5fde7273207c7122b0650ceb72510e0 – before 21c963de2e86e88f6a8ca556bcebb8e62ab8e901ace7f46ba5fde7273207c7122b0650ceb72510e0 – before 144d76a676b630e321556965011b00e2de0b40a7ace7f46ba5fde7273207c7122b0650ceb72510e0 – before 397a8990c377ee4b61d6df768e61dff9e316d46bace7f46ba5fde7273207c7122b0650ceb72510e0 – before eaddb86637669f6bad89245ee63f8fb2bfb50241ace7f46ba5fde7273207c7122b0650ceb72510e0 – before fa85b016a56b9775a3fe41e5d26e666945963b46ace7f46ba5fde7273207c7122b0650ceb72510e0 – before e2f433ea7d0ff77998766a088a287337fb43ad75ace7f46ba5fde7273207c7122b0650ceb72510e0 – before 28027ec8e32ecbadcd67623edb290dad61e735b5 |
| Linux | Linux | 4.10 |
References
- https://git.kernel.org/stable/c/56bec63a7fc87ad50b3373a87517dc9770eef9e0
- https://git.kernel.org/stable/c/21c963de2e86e88f6a8ca556bcebb8e62ab8e901
- https://git.kernel.org/stable/c/144d76a676b630e321556965011b00e2de0b40a7
- https://git.kernel.org/stable/c/397a8990c377ee4b61d6df768e61dff9e316d46b
- https://git.kernel.org/stable/c/eaddb86637669f6bad89245ee63f8fb2bfb50241
- https://git.kernel.org/stable/c/fa85b016a56b9775a3fe41e5d26e666945963b46
- https://git.kernel.org/stable/c/e2f433ea7d0ff77998766a088a287337fb43ad75
- https://git.kernel.org/stable/c/28027ec8e32ecbadcd67623edb290dad61e735b5
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html
- https://cert-portal.siemens.com/productcert/html/ssa-355557.html