kern/187624: WEP and other ciphers do not work if h/w driver does not declare support

Sean Bruno sbruno at freebsd.org
Sun Mar 16 00:10:00 UTC 2014


>Number:         187624
>Category:       kern
>Synopsis:       WEP and other ciphers do not work if h/w driver does not declare support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 16 00:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Sean Bruno
>Release:        -CURRENT
>Organization:
FreeBSD Project
>Environment:
FreeBSD powernoodle.corp.yahoo.com 11.0-CURRENT FreeBSD 11.0-CURRENT #11 r263173: Sat Mar 15 13:31:08 JST 2014     sbruno at powernoodle.corp.yahoo.com:/usr/obj/usr/src/sys/POWERNOODLE  amd64

>Description:
Discovered that, with the import of wpa_supplicant 2.0, WEP no longer works with drivers (iwn for example) if the driver does not declare support for the WEP cipher.

This should be handled by net80211 in s/w if the h/w and driver do not declare support for the appropriate cipher.

This is not a bug in iwn(4) but in the way wpa_supplicant attempts to detect and support h/w that does not have cipher offloading for the requested network.
>How-To-Repeat:
Attempt to use iwn(4) to associate to a WEP network
>Fix:
Use the attached patch (from rpaulo) to declare the cipher's capabilities no matter what.

thanks to Allan Jude for help in diagnosing this at AsiaBSDCon 2014

Patch attached with submission follows:

diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c
--- a/contrib/wpa/src/drivers/driver_bsd.c
+++ b/contrib/wpa/src/drivers/driver_bsd.c
@@ -1446,6 +1446,7 @@
 		drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA2 |
 			WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK;
 
+#ifndef __FreeBSD__
 	if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_WEP)
 		drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 |
 			WPA_DRIVER_CAPA_ENC_WEP104;
@@ -1453,6 +1454,12 @@
 		drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP;
 	if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM)
 		drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP;
+#else
+	drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 |
+	    WPA_DRIVER_CAPA_ENC_WEP104 |
+	    WPA_DRIVER_CAPA_ENC_TKIP |
+	    WPA_DRIVER_CAPA_ENC_CCMP;
+#endif
 
 	if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP)
 		drv->capa.flags |= WPA_DRIVER_FLAGS_AP;


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list