]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: rndis: prevent integer overflow in rndis_set_response()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 1 Mar 2022 08:04:24 +0000 (11:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Mar 2022 14:48:57 +0000 (15:48 +0100)
commit3750c14335a9d384dca8bc80aaf36fb24a7e1b95
treeb690a681262c2385e1f68e86085137d41821b824
parent4383e231a606264090663083910f20a31927ae1d
usb: gadget: rndis: prevent integer overflow in rndis_set_response()

If "BufOffset" is very large the "BufOffset + 8" operation can have an
integer overflow.

Cc: stable@kernel.org
Fixes: 9b15ae099a90 ("usb: gadget: rndis: check size of RNDIS_MSG_SET command")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220301080424.GA17208@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/rndis.c