# CVE-2024-40978: scsi: qedi: Fix crash while reading debugfs attribute

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

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; 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.33% (percentile 19, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2024-07-12T12:32:14.149Z
- **Modified:** 2026-10-15T01:18:39.540Z

## Who should check

- Anyone running Linux \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 56bec63a7fc87ad50b3373a87517dc9770eef9e0; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 21c963de2e86e88f6a8ca556bcebb8e62ab8e901; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 144d76a676b630e321556965011b00e2de0b40a7; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 397a8990c377ee4b61d6df768e61dff9e316d46b; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< eaddb86637669f6bad89245ee63f8fb2bfb50241; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< fa85b016a56b9775a3fe41e5d26e666945963b46; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< e2f433ea7d0ff77998766a088a287337fb43ad75; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 28027ec8e32ecbadcd67623edb290dad61e735b5
- Anyone running Linux 4.10

## 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 and fixed versions

- Linux: \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 56bec63a7fc87ad50b3373a87517dc9770eef9e0; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 21c963de2e86e88f6a8ca556bcebb8e62ab8e901; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 144d76a676b630e321556965011b00e2de0b40a7; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 397a8990c377ee4b61d6df768e61dff9e316d46b; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< eaddb86637669f6bad89245ee63f8fb2bfb50241; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< fa85b016a56b9775a3fe41e5d26e666945963b46; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< e2f433ea7d0ff77998766a088a287337fb43ad75; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 28027ec8e32ecbadcd67623edb290dad61e735b5 (cvelist)
- Linux: 4.10 (cvelist)

## Mitigation

- Upgrade Linux to 28027ec8e32ecbadcd67623edb290dad61e735b5 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-40978.md
Affected: Linux >= ace7f46ba5fde7273207c7122b0650ceb72510e0, < 56bec63a7fc87ad50b3373a87517dc9770eef9e0; >= ace7f46ba5fde7273207c7122b0650ceb72510e0, < 21c963de2e86e88f6a8ca556bcebb8e62ab8e901; >= ace7f46ba5fde7273207c7122b0650ceb72510e0, < 144d76a676b630e321556965011b00e2de0b40a7; >= ace7f46ba5fde7273207c71…
Fixed in: Linux 56bec63a7fc87ad50b3373a87517dc9770eef9e0, Linux 21c963de2e86e88f6a8ca556bcebb8e62ab8e901, Linux 144d76a676b630e321556965011b00e2de0b40a7, Linux 397a8990c377ee4b61d6df768e61dff9e316d46b, Linux 28027ec8e32ecbadcd67623edb290dad61e735b5

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-2024-40978 being exploited?

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

### How serious is CVE-2024-40978?

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

### Which versions are affected by CVE-2024-40978?

Linux \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 56bec63a7fc87ad50b3373a87517dc9770eef9e0; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 21c963de2e86e88f6a8ca556bcebb8e62ab8e901; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 144d76a676b630e321556965011b00e2de0b40a7; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 397a8990c377ee4b61d6df768e61dff9e316d46b; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< eaddb86637669f6bad89245ee63f8fb2bfb50241; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< fa85b016a56b9775a3fe41e5d26e666945963b46; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< e2f433ea7d0ff77998766a088a287337fb43ad75; \>= ace7f46ba5fde7273207c7122b0650ceb72510e0, \< 28027ec8e32ecbadcd67623edb290dad61e735b5; Linux 4.10.

### Is there a fix for CVE-2024-40978?

Yes. Fixed in Linux 56bec63a7fc87ad50b3373a87517dc9770eef9e0, Linux 21c963de2e86e88f6a8ca556bcebb8e62ab8e901, Linux 144d76a676b630e321556965011b00e2de0b40a7, Linux 397a8990c377ee4b61d6df768e61dff9e316d46b, Linux 28027ec8e32ecbadcd67623edb290dad61e735b5. Upgrade Linux to 28027ec8e32ecbadcd67623edb290dad61e735b5 or later.

### How do I check if I'm affected by CVE-2024-40978?

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/56bec63a7fc87ad50b3373a87517dc9770eef9e0>
- patch: <https://git.kernel.org/stable/c/21c963de2e86e88f6a8ca556bcebb8e62ab8e901>
- patch: <https://git.kernel.org/stable/c/144d76a676b630e321556965011b00e2de0b40a7>
- patch: <https://git.kernel.org/stable/c/397a8990c377ee4b61d6df768e61dff9e316d46b>
- patch: <https://git.kernel.org/stable/c/eaddb86637669f6bad89245ee63f8fb2bfb50241>
- patch: <https://git.kernel.org/stable/c/fa85b016a56b9775a3fe41e5d26e666945963b46>
- patch: <https://git.kernel.org/stable/c/e2f433ea7d0ff77998766a088a287337fb43ad75>
- patch: <https://git.kernel.org/stable/c/28027ec8e32ecbadcd67623edb290dad61e735b5>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-355557.html>

## 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-2024-40978>

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