usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 170a6726d0e266f2c8f306e3d61715c32f4ee41e · < 7dd08a0b4193087976db6b3ee7807de7e8316f96| No fix yet |
| Linux Linux |
|
|
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()
From the CVE record · Linux
The Linux kernel’s USB Type-C UCSI code can access beyond the bounds of an array when handling a command value supplied through debugfs. A local user who can write to the relevant debugfs interface can supply a value larger than the array allows; the input does not specify any further impact.
Anyone running the Linux kernel should check whether their kernel includes the fix for CVE-2024-50268; affected versions were not provided.