syzbot found a problem using of uinit pointer in
lg4ff_set_autocenter_default().
Reported-by: syzbot+1234691fec1b8ceba8b1@syzkaller.appspotmail.com
Tested by syzbot:
https://groups.google.com/d/msg/syzkaller-bugs/ApnMLW6sfKE/Qq0bIHGEAQAJ
Signed-off-by: Phong Tran <redacted>
---
drivers/hid/hid-lg4ff.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
This seems weird to me:
the syzbot link above is about `hid_get_drvdata(hid)`, and, as I read
it, the possibility that hid might not have an initialized value.
Here you are changing the initialized values of value, entry and
drv_data, all 3 are never used before their first assignment.
I have a feeling this particular syzbot check has already been fixed
upstream by d9d4b1e46d95 "HID: Fix assumption that devices have
inputs".
Cheers,
Benjamin
This seems weird to me:
the syzbot link above is about `hid_get_drvdata(hid)`, and, as I read
it, the possibility that hid might not have an initialized value.
In the dashboard [1] shows
BUG: KMSAN: uninit-value in dev_get_drvdata include/linux/device.h:1388
[inline]
BUG: KMSAN: uninit-value in hid_get_drvdata include/linux/hid.h:628 [inline]
BUG: KMSAN: uninit-value in lg4ff_set_autocenter_default+0x23a/0xa20
drivers/hid/hid-lg4ff.c:477
base on that I did the initialization the pointer in the patch.
Here you are changing the initialized values of value, entry and
drv_data, all 3 are never used before their first assignment.
I have a feeling this particular syzbot check has already been fixed
upstream by d9d4b1e46d95 "HID: Fix assumption that devices have
inputs".
This seems weird to me:
the syzbot link above is about `hid_get_drvdata(hid)`, and, as I read
it, the possibility that hid might not have an initialized value.
In the dashboard [1] shows
BUG: KMSAN: uninit-value in dev_get_drvdata include/linux/device.h:1388
[inline]
BUG: KMSAN: uninit-value in hid_get_drvdata include/linux/hid.h:628 [inline]
BUG: KMSAN: uninit-value in lg4ff_set_autocenter_default+0x23a/0xa20
drivers/hid/hid-lg4ff.c:477
base on that I did the initialization the pointer in the patch.
quoted
Here you are changing the initialized values of value, entry and
drv_data, all 3 are never used before their first assignment.
I have a feeling this particular syzbot check has already been fixed
upstream by d9d4b1e46d95 "HID: Fix assumption that devices have
inputs".