]> git.karo-electronics.de Git - karo-tx-linux.git/commit
nl80211: fix check for valid SSID size in scan operations
authorLuciano Coelho <coelho@ti.com>
Wed, 18 May 2011 21:43:38 +0000 (00:43 +0300)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 17 May 2012 15:20:44 +0000 (11:20 -0400)
commit064a930ea49c1c420c45f8b0db9b0609c5aa3047
tree37ed4b4bacd7443fab7594645da650d2b350d4c0
parentd99563ef3f1ce4427a8360c8daba821c0840a7ec
nl80211: fix check for valid SSID size in scan operations

commit 208c72f4fe44fe09577e7975ba0e7fa0278f3d03 upstream.

In both trigger_scan and sched_scan operations, we were checking for
the SSID length before assigning the value correctly.  Since the
memory was just kzalloc'ed, the check was always failing and SSID with
over 32 characters were allowed to go through.

This was causing a buffer overflow when copying the actual SSID to the
proper place.

This bug has been there since 2.6.29-rc4.

[PG: 34 codebase does not have nl80211_start_sched_scan part]

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/wireless/nl80211.c