CVE-2024-56698
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-56698 is a vulnerability discovered in the Linux kernel's USB DWC3 gadget driver. The issue was disclosed on December 28, 2024, and affects multiple versions of the Linux kernel from 4.18 through 6.12.2. The vulnerability stems from incorrect handling of queued Scatter-Gather (SG) entries in the USB subsystem (NVD).

Technical details

The vulnerability occurs in the dwc3 gadget driver where the dwc3request->numqueuedsgs counter is decremented on completion. When a partially completed request is handled, the numqueued_sgs value no longer accurately reflects the total number of queued SG entries as it would be cleared. This can lead to incorrect checking of the number of request SG entries remaining to be prepared and queued, potentially resulting in a null pointer dereference when accessing non-existent SG entries. The vulnerability has been assigned a CVSS v3.1 base score of 5.5 (Medium) with vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (NVD).

Impact

The vulnerability can lead to a null pointer dereference in the Linux kernel's USB subsystem, potentially resulting in a denial of service condition. The impact is limited to local attacks and requires local user privileges to exploit (NVD).

Mitigation and workarounds

The vulnerability has been patched in multiple Linux kernel versions. The fix involves correctly tracking the number of remaining SG entries to be prepared and queued by using req->numpendingsgs instead of the difference between nummappedsgs and numqueuedsgs. The patch has been backported to affected stable kernel versions (Kernel Patch).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40258HIGH7
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-devel-matched
NoNoDec 04, 2025
CVE-2025-40259MEDIUM6.2
  • Linux KernelLinux Kernel
  • kernel-rt-64k
NoNoDec 04, 2025
CVE-2025-40264MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-64k-modules-extra
NoNoDec 04, 2025
CVE-2025-40254MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-64k-devel-matched
NoNoDec 04, 2025
CVE-2025-40253MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-64k-debug-modules-partner
NoNoDec 04, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management