]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: usbhid: free raw_report buffers in usbhid_stop
authorAnirudh Rayabharam <mail@anirudhrb.com>
Wed, 23 Jun 2021 18:40:29 +0000 (00:10 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Oct 2021 08:22:25 +0000 (10:22 +0200)
commit7ce4e49146612261265671b1d30d117139021030
tree47ce5a7c643111a4d2928cf644ee3cb055edb093
parentc55127a19d3cc334978eaddc2d7cdb19e2c2b29f
HID: usbhid: free raw_report buffers in usbhid_stop

commit f7744fa16b96da57187dc8e5634152d3b63d72de upstream.

Free the unsent raw_report buffers when the device is removed.

Fixes a memory leak reported by syzbot at:
https://syzkaller.appspot.com/bug?id=7b4fa7cb1a7c2d3342a2a8a6c53371c8c418ab47

Reported-by: syzbot+47b26cd837ececfc666d@syzkaller.appspotmail.com
Tested-by: syzbot+47b26cd837ececfc666d@syzkaller.appspotmail.com
Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/usbhid/hid-core.c