CVE-2024-26749·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable() ... cdns3_gadget_ep_free_request(&priv_ep->endpoint, &priv_req->request); list_del_init(&priv_req->list); ... 'priv_req' actually free at cdns3_gadget_ep_free_request(). But list_del_init() use priv_req->list after it. [ 1542.642868][ T534] BUG: KFENCE: use-after-free read in __list_del_entry_valid+0x10/0xd4 [ 1542.642868][ T534] [ 1542.653162][ T534] Use-after-free read at 0x000000009ed0ba99 (in kfence-#3): [ 1542.660311][ T534] __list_del_entry_valid+0x10/0xd4 [ 1542.665375][ T534] cdns3_gadget_ep_disable+0x1f8/0x388 [cdns3] [ 1542.671571][ T534] usb_ep_disable+0x44/0xe4 [ 1542.675948][ T534] ffs_func_eps_disable+0x64/0xc8 [ 1542.680839][ T534] ffs_func_set_alt+0x74/0x368 [ 1542.685478][ T534] ffs_func_disable+0x18/0x28 Move list_del_init() before cdns3_gadget_ep_free_request() to resolve this problem.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.7.7
- Published
- 2024-04-03
Affected versions
From: 6.7
Until: 6.7.7
Fixed in: 6.7.7
How to fix this CVE
Update your Linux kernel to version 6.7.7 or later to resolve a use-after-free memory safety issue in the USB Cadence 3 gadget driver. This vulnerability can lead to kernel crashes or memory corruption when disabling USB endpoints. Apply the patch through your distribution's package manager as soon as possible.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check kernel version: uname -r — vulnerable if output shows 6.7.0 through 6.7.6
- Verify USB gadget subsystem is enabled: grep CONFIG_USB_CDNS3_GADGET /boot/config-$(uname -r) — if output is 'y', the vulnerable component is active
- Search kernel logs for use-after-free errors: dmesg | grep -i 'use-after-free\|KFENCE\|cdns3_gadget_ep_disable' — exploitation attempts may trigger these messages
- Confirm patch applied: grep -r 'cdns3_gadget_ep_disable' /boot/vmlinuz-$(uname -r) && uname -r | grep -E '6\.7\.[7-9]|6\.[8-9]' — kernel should be 6.7.7 or higher
FAQ
What is CVE-2024-26749?
This is a use-after-free vulnerability in the Linux kernel's USB Cadence 3 gadget driver where a memory structure is freed prematurely, then accessed again during endpoint disable operations. This can corrupt kernel memory and cause system crashes or potential privilege escalation.
Is CVE-2024-26749 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are available, but it poses a significant stability risk to systems with USB gadget functionality enabled.
What versions of Kernel are affected by CVE-2024-26749?
Linux kernel versions 6.7.0 through 6.7.6 are vulnerable. The fix was introduced in version 6.7.7 and backported to stable branches.
How do I check if my server is vulnerable to CVE-2024-26749?
Run 'uname -r' and check if the output shows kernel 6.7.x with x < 7. Then verify USB gadget is enabled with 'grep CONFIG_USB_CDNS3_GADGET /boot/config-$(uname -r)' — if it returns 'y', your system is vulnerable.
Does Defensia detect CVE-2024-26749?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-26749 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/2134e9906e17b1e5284300fab547869ebacfd7d9
- https://git.kernel.org/stable/c/29e42e1578a10c611b3f1a38f3229b2d664b5d16
- https://git.kernel.org/stable/c/4e5c73b15d95452c1ba9c771dd013a3fbe052ff3
- https://git.kernel.org/stable/c/9a07244f614bc417de527b799da779dcae780b5d
- https://git.kernel.org/stable/c/b40328eea93c75a5645891408010141a0159f643
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-26749. Free for 1 server.
Get started free