From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 17:08:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 237CC106566C; Sat, 10 Mar 2012 17:08:58 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6C08FC12; Sat, 10 Mar 2012 17:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AH8vF5065242; Sat, 10 Mar 2012 17:08:57 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AH8vIJ065240; Sat, 10 Mar 2012 17:08:57 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201203101708.q2AH8vIJ065240@svn.freebsd.org> From: Mitsuru IWASAKI Date: Sat, 10 Mar 2012 17:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232785 - head/sys/dev/iwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 17:08:58 -0000 Author: iwasaki Date: Sat Mar 10 17:08:57 2012 New Revision: 232785 URL: http://svn.freebsd.org/changeset/base/232785 Log: Fix wrong asresp frame parsing in iwi_checkforqos(). After 8.0-RELEASE, iwi(4) doesn't send any data frames in infrastructure mode. Bacause of the condition `while (frm < efrm)', IEEE80211_VERIFY_LENGTH() was checking item length beyond the ieee80211_frame region, and returned from iwi_checkforqos() without setting flags, capinfo and associd. In infrastructure mode associd is required, so this problem causes discarding mbuf in ieee80211_start(). PR: kern/165819 Tested/Reviewed/Supported by: bschmidt and adrian MFC after: 1 week Modified: head/sys/dev/iwi/if_iwi.c Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Sat Mar 10 15:08:37 2012 (r232784) +++ head/sys/dev/iwi/if_iwi.c Sat Mar 10 17:08:57 2012 (r232785) @@ -1357,8 +1357,8 @@ iwi_checkforqos(struct ieee80211vap *vap frm += 2; wme = NULL; - while (frm < efrm) { - IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1], return); + while (efrm - frm > 1) { + IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return); switch (*frm) { case IEEE80211_ELEMID_VENDOR: if (iswmeoui(frm))