diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-11-11 14:08:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-12 12:54:01 +0100 |
commit | e56aac6e5a25630645607b6856d4b2a17b2311a5 (patch) | |
tree | 91df3037d136ad84d3371f1791f3f0b8ad0b0262 /drivers/usb/cdns3/cdns3-pci-wrap.c | |
parent | 2481af79671a6603fce201cbbc48f31e488e9fae (diff) |
usb: typec: fix potential array underflow in ucsi_ccg_sync_control()
The "command" variable can be controlled by the user via debugfs. The
worry is that if con_index is zero then "&uc->ucsi->connector[con_index
- 1]" would be an array underflow.
Fixes: 170a6726d0e2 ("usb: typec: ucsi: add support for separate DP altmode devices")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/c69ef0b3-61b0-4dde-98dd-97b97f81d912@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-pci-wrap.c')
0 files changed, 0 insertions, 0 deletions