summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2023-04-06 11:55:17 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-04-24 08:02:57 +0300
commite4eea890369c00dd58d97b1c066dc2bddf0da2c7 (patch)
tree06001e06d7ba7fd6d036b529714ae9429d50cd1a /net/bluetooth
parent0811ff480978a2122f0465cb8682d9f7a2f6a169 (diff)
downloadlinux-e4eea890369c00dd58d97b1c066dc2bddf0da2c7.tar.xz
Bluetooth: vhci: Fix info leak in force_devcd_write()
There are a number of bugs here: 1) If "count" is less than sizeof(dump_data.data) then it copies uninitialized data. 2) If simple_write_to_buffer() returns -EFAULT then we run into a problem "ret < count" comparison. "count" is an unsigned long so the comparison is type promoted to unsigned long and the negative returns become high positive values. That also results in copying uninitialized data. 3) If "*ppos" is non-zero then the first part of the dump_data buffer is uninitialized. Using copy_from_user() instead of simple_write_to_buffer() is more appropriate here. Fixes: d5d5df6da0aa ("Bluetooth: Add vhci devcoredump support") Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth')
0 files changed, 0 insertions, 0 deletions