aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sensor-hub.c
diff options
context:
space:
mode:
authorMichael Zaidman <[email protected]>2021-04-13 15:12:00 +0000
committerJiri Kosina <[email protected]>2021-05-05 12:32:46 +0000
commitb45ef5db7bf268f6851bb5395d60301338374abc (patch)
tree9d8d3b74b3bd109eb566c8ff28033907327a8dd0 /drivers/hid/hid-sensor-hub.c
parentHID: surface-hid: Fix integer endian conversion (diff)
downloadkernel-b45ef5db7bf268f6851bb5395d60301338374abc.tar.gz
kernel-b45ef5db7bf268f6851bb5395d60301338374abc.zip
HID: ft260: check data size in ft260_smbus_write()
The SMbus block transaction limits the number of bytes transferred to 32, but nothing prevents a user from specifying via ioctl a larger data size than the ft260 can handle in a single transfer. i2cdev_ioctl_smbus() --> i2c_smbus_xfer --> __i2c_smbus_xfer --> ft260_smbus_xfer --> ft260_smbus_write This patch adds data size checking in the ft260_smbus_write(). Fixes: 98189a0adfa0 ("HID: ft260: add usb hid to i2c host bridge driver") Signed-off-by: Michael Zaidman <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
0 files changed, 0 insertions, 0 deletions