staging: rtl8712: prevent buffer overrun in recvbuf2recvframe
authorHaggai Eran <haggai.eran@gmail.com>
Sat, 23 May 2015 20:13:51 +0000 (23:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:42 +0000 (09:29 -0700)
commit38559326b111e77afbd77dad2117bdebc0b536a2
tree9b3e15f2de8f8458a9460d2f3be1a9031c8f3ea7
parent885c15d7ea3d8d883394d81ec57758857a2b1a54
staging: rtl8712: prevent buffer overrun in recvbuf2recvframe

commit cab462140f8a183e3cca0b51c8b59ef715cb6148 upstream.

With an RTL8191SU USB adaptor, sometimes the hints for a fragmented
packet are set, but the packet length is too large. Allocate enough
space to prevent memory corruption and a resulting kernel panic [1].

[1] http://www.spinics.net/lists/linux-wireless/msg136546.html

Signed-off-by: Haggai Eran <haggai.eran@gmail.com>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_recv.c