]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: serial: garmin_gps: add sanity checking for data length
authorOliver Neukum <oneukum@suse.com>
Wed, 15 Apr 2020 14:03:04 +0000 (16:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:15:27 +0000 (08:15 +0200)
commit567299fef491d0d4033e5093424dc21835e1825d
tree54a25e25daf9299f2096b6b4dd4ea321da7c3972
parenta8c9cebed0d47a0dcd7075418969e691521fa1c4
USB: serial: garmin_gps: add sanity checking for data length

commit e9b3c610a05c1cdf8e959a6d89c38807ff758ee6 upstream.

We must not process packets shorter than a packet ID

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reported-and-tested-by: syzbot+d29e9263e13ce0b9f4fd@syzkaller.appspotmail.com
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/garmin_gps.c