airo: Fix read overflows sending packets
commit5438830ea8bc7e4d3bc606844d4f2f77d6e62ad7
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 27 May 2020 18:48:30 +0000 (27 21:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Jun 2020 11:16:49 +0000 (7 13:16 +0200)
treeffbce1f16b4a9a412d03967528bce88f0509b339
parent897b7c720803aacf7c94a0054648210d7c737f06
airo: Fix read overflows sending packets

commit 11e7a91994c29da96d847f676be023da6a2c1359 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/cisco/airo.c