From owner-svn-src-head@freebsd.org Fri May 12 06:16:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6A80D69CFD; Fri, 12 May 2017 06:16:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7680015C6; Fri, 12 May 2017 06:16:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6GB4t065379; Fri, 12 May 2017 06:16:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6GB7i065378; Fri, 12 May 2017 06:16:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120616.v4C6GB7i065378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318224 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:16:12 -0000 Author: adrian Date: Fri May 12 06:16:11 2017 New Revision: 318224 URL: https://svnweb.freebsd.org/changeset/base/318224 Log: [iwm] Refuse connection to APs with beacon interval < 16. Obtained from: dragonflybsd.git aba448de727e9b122adadeb36fd00a8ad6018d4f Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:05:34 2017 (r318223) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:16:11 2017 (r318224) @@ -3976,6 +3976,21 @@ iwm_auth(struct ieee80211vap *vap, struc in->in_assoc = 0; + /* + * Firmware bug - it'll crash if the beacon interval is less + * than 16. We can't avoid connecting at all, so refuse the + * station state change, this will cause net80211 to abandon + * attempts to connect to this AP, and eventually wpa_s will + * blacklist the AP... + */ + if (ni->ni_intval < 16) { + device_printf(sc->sc_dev, + "AP %s beacon interval is %d, refusing due to firmware bug!\n", + ether_sprintf(ni->ni_bssid), ni->ni_intval); + error = EINVAL; + goto out; + } + error = iwm_mvm_sf_config(sc, IWM_SF_FULL_ON); if (error != 0) return error;