staging: gdm724x: check for buffer overflow in gdm_lte_multi_sdu_pkt()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 14 Jun 2021 09:55:35 +0000 (12:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Jun 2021 14:39:33 +0000 (16:39 +0200)
commit4a36e160856db8a8ddd6a3d2e5db5a850ab87f82
treee9329560a9825d951afd002ad30f3a1176887cbb
parent23f89b12753260463ebe027eed6324be33565010
staging: gdm724x: check for buffer overflow in gdm_lte_multi_sdu_pkt()

There needs to be a check to verify that we don't read beyond the end
of "buf".  This function is called from do_rx().  The "buf" is the USB
transfer_buffer and "len" is "urb->actual_length".

Fixes: 61e121047645 ("staging: gdm7240: adding LTE USB driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YMcnl4zCwGWGDVMG@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm724x/gdm_lte.c