From owner-svn-src-head@FreeBSD.ORG Tue Sep 9 05:21:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org 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 4A10FB33; Tue, 9 Sep 2014 05:21:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 354B0EE4; Tue, 9 Sep 2014 05:21:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s895LWSR037336; Tue, 9 Sep 2014 05:21:32 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s895LWgQ037335; Tue, 9 Sep 2014 05:21:32 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201409090521.s895LWgQ037335@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 9 Sep 2014 05:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271303 - head/sys/dev/usb/wlan 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.18-1 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: Tue, 09 Sep 2014 05:21:32 -0000 Author: kevlo Date: Tue Sep 9 05:21:31 2014 New Revision: 271303 URL: http://svnweb.freebsd.org/changeset/base/271303 Log: Drop frames that have larger than MCLBYTES. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Tue Sep 9 04:20:53 2014 (r271302) +++ head/sys/dev/usb/wlan/if_urtwn.c Tue Sep 9 05:21:31 2014 (r271303) @@ -660,6 +660,10 @@ urtwn_rx_frame(struct urtwn_softc *sc, u ifp->if_ierrors++; return (NULL); } + if (pktlen < sizeof(*wh) || pktlen > MCLBYTES) { + ifp->if_ierrors++; + return (NULL); + } rate = MS(rxdw3, R92C_RXDW3_RATE); infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8;