CVE-2024-50268 usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd()
A local attacker with debugfs access can trigger an out-of-bounds write in the Linux kernel USB Type-C driver, potentially leading to code execution or privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-50268?
CVE-2024-50268 is a high-severity memory corruption vulnerability in Linux kernel, published on 19 Nov 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd()
The "*cmd" variable can be controlled by the user via debugfs. That means "new_cam" can be as high as 255 while the size of the uc->updated[] array is UCSI_MAX_ALTMODES (30).
The call tree is: ucsi_cmd() // val comes from simple_attr_write_xsigned() -> ucsi_send_command() -> ucsi_send_command_common() -> ucsi_run_command() // calls ucsi->ops->sync_control() -> ucsi_ccg_sync_control()
Weakness: CWE-125
Which versions are affected by CVE-2024-50268?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-50268?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2024-50268 being exploited?
There is no known exploitation of CVE-2024-50268 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-53618, BELL-CVE-2024-50268, DEBIAN-CVE-2024-50268, GHSA-rcqh-96hr-hv69, UBUNTU-CVE-2024-50268.