# CVE-2024-56698: usb: dwc3: gadget: Fix looping of queued SG entries

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2024-12-28T09:46:21.363Z
- Modified: 2026-06-17T08:12:46.373Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

usb: dwc3: gadget: Fix looping of queued SG entries

The dwc3_request->num_queued_sgs is decremented on completion. If a
partially completed request is handled, then the
dwc3_request->num_queued_sgs no longer reflects the total number of
num_queued_sgs (it would be cleared).

Correctly check the number of request SG entries remained to be prepare
and queued. Failure to do this may cause null pointer dereference when
accessing non-existent SG entry.

(As written by CVE List.)

## Affected

- Linux Linux: from c96e6725db9d6a04ac1bee881e3034b636d9f71c before 8ceb21d76426bbe7072cc3e43281e70c0d664cc7; from c96e6725db9d6a04ac1bee881e3034b636d9f71c before 0247da93bf62d33304b7bf97850ebf2a86e06d28; from c96e6725db9d6a04ac1bee881e3034b636d9f71c before c9e72352a10ae89a430449f7bfeb043e75c255d9; from c96e6725db9d6a04ac1bee881e3034b636d9f71c before 1534f6f69393aac773465d80d31801b554352627; from c96e6725db9d6a04ac1bee881e3034b636d9f71c before b7c3d0b59213ebeedff63d128728ce0b3d7a51ec; from c96e6725db9d6a04ac1bee881e3034b636d9f71c before 70777a23a54e359cfdfafc625a57cd56434f3859; from c96e6725db9d6a04ac1bee881e3034b636d9f71c before b7fc65f5141c24785dc8c19249ca4efcf71b3524; 4.18 (not affected: before 4.18; from 5.10.231 up to 5.10.*; from 5.15.174 up to 5.15.*; from 6.1.120 up to 6.1.*; from 6.6.64 up to 6.6.*; from 6.11.11 up to 6.11.*; from 6.12.2 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: from 4.18 before 5.10.231; from 5.11 before 5.15.174; from 5.16 before 6.1.120; from 6.2 before 6.6.64; from 6.7 before 6.11.11; from 6.12 before 6.12.2

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/8ceb21d76426bbe7072cc3e43281e70c0d664cc7> (patch)
- <https://git.kernel.org/stable/c/0247da93bf62d33304b7bf97850ebf2a86e06d28> (patch)
- <https://git.kernel.org/stable/c/c9e72352a10ae89a430449f7bfeb043e75c255d9> (patch)
- <https://git.kernel.org/stable/c/1534f6f69393aac773465d80d31801b554352627> (patch)
- <https://git.kernel.org/stable/c/b7c3d0b59213ebeedff63d128728ce0b3d7a51ec> (patch)
- <https://git.kernel.org/stable/c/70777a23a54e359cfdfafc625a57cd56434f3859> (patch)
- <https://git.kernel.org/stable/c/b7fc65f5141c24785dc8c19249ca4efcf71b3524> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>

## Sources

- CVE List: [CVE-2024-56698](https://www.cve.org/CVERecord?id=CVE-2024-56698), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-56698](https://nvd.nist.gov/vuln/detail/CVE-2024-56698), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-56698 · Whole record: https://cve.day/CVE-2024-56698.json · Rebuilt by cve.day 2026-11-25T22:58:50.537Z
