From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 16 00:10:00 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7936F23D for ; Sun, 16 Mar 2014 00:10:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 53C503E9 for ; Sun, 16 Mar 2014 00:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2G0A0Ev070551 for ; Sun, 16 Mar 2014 00:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2G0A0He070548; Sun, 16 Mar 2014 00:10:00 GMT (envelope-from gnats) Resent-Date: Sun, 16 Mar 2014 00:10:00 GMT Resent-Message-Id: <201403160010.s2G0A0He070548@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sean Bruno Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1453236 for ; Sun, 16 Mar 2014 00:09:13 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 740E73E5 for ; Sun, 16 Mar 2014 00:09:13 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2G09C0B023616 for ; Sun, 16 Mar 2014 00:09:12 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2G09CD9023613; Sun, 16 Mar 2014 00:09:12 GMT (envelope-from nobody) Message-Id: <201403160009.s2G09CD9023613@cgiserv.freebsd.org> Date: Sun, 16 Mar 2014 00:09:12 GMT From: Sean Bruno To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/187624: WEP and other ciphers do not work if h/w driver does not declare support X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2014 00:10:00 -0000 >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@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: