]> git.baikalelectronics.ru Git - kernel.git/commit
airo: Fix read overflows sending packets
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 27 May 2020 18:48:30 +0000 (21:48 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 29 May 2020 17:40:22 +0000 (20:40 +0300)
commit01494788d2a37a1d2e2df7a5cf1fc89011870e78
tree5803e9975cb461084b7c68bb07f292f854893304
parentd87f6ebca667dff236214d2123ae3b8f1f0312c0
airo: Fix read overflows sending packets

The problem is that we always copy a minimum of ETH_ZLEN (60) bytes from
skb->data even when skb->len is less than ETH_ZLEN so it leads to a read
overflow.

The fix is to pad skb->data to at least ETH_ZLEN bytes.

Cc: <stable@vger.kernel.org>
Reported-by: Hu Jiahui <kirin.say@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200527184830.GA1164846@mwanda
drivers/net/wireless/cisco/airo.c