From owner-freebsd-wireless@freebsd.org Sun Dec 13 22:14:10 2015 Return-Path: Delivered-To: freebsd-wireless@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 79093A42020; Sun, 13 Dec 2015 22:14:10 +0000 (UTC) (envelope-from torfinn.ingolfsen@getmail.no) Received: from lamora.getmail.no (lamora.getmail.no [84.210.184.7]) by mx1.freebsd.org (Postfix) with ESMTP id 3ACE21DFD; Sun, 13 Dec 2015 22:14:09 +0000 (UTC) (envelope-from torfinn.ingolfsen@getmail.no) Received: from localhost (localhost [127.0.0.1]) by lamora.getmail.no (Postfix) with ESMTP id 91CB7E616E; Sun, 13 Dec 2015 23:05:22 +0100 (CET) Received: from lamora.getmail.no ([127.0.0.1]) by localhost (lamora.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id p6rt5w5ZAYMc; Sun, 13 Dec 2015 23:05:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lamora.getmail.no (Postfix) with ESMTP id 1DF76E670C; Sun, 13 Dec 2015 23:05:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.8.4 lamora.getmail.no 1DF76E670C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=getmail.no; s=8A9C8B4C-D727-11E2-8095-B6466E6B3FA2; t=1450044322; bh=G3yeeN1iakPu413SZQrvQsM1pL4wELXguRS8RHKRzxU=; h=Date:From:To:Subject:Message-Id:Mime-Version:Content-Type: Content-Transfer-Encoding; b=cE9/dhWuRJ7hNC7587gDoX/o2Kss+/Kkd8fDU75GiceonW6KRhX3+3+JaGpP4cAYG skifKSYO4mMzbtNcXORmin0+jN1MgpMvDJ627RIikJw2Dh+nuEXhXAVWZbooFpVP5A KmdTQH8UBWub0J3dpZR63++gIJt2LL+kNEfuyfd8= X-Virus-Scanned: amavisd-new at lamora.get.c.bitbit.net Received: from lamora.getmail.no ([127.0.0.1]) by localhost (lamora.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id I7m6ScsbY9OL; Sun, 13 Dec 2015 23:05:21 +0100 (CET) Received: from kg-core1.kg4.no (cm-84.215.226.9.getinternet.no [84.215.226.9]) by lamora.getmail.no (Postfix) with ESMTPSA id E209AE616E; Sun, 13 Dec 2015 23:05:21 +0100 (CET) Date: Sun, 13 Dec 2015 23:05:21 +0100 From: Torfinn Ingolfsen To: freebsd-usb@FreeBSD.org Cc: freebsd-wireless@freebsd.org Subject: Zyxel NWD2105 support not complete in FreeBSD 10.2-stable Message-Id: <20151213230521.1b5989084c95173f73343000@getmail.no> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.28; amd64-portbld-freebsd9.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Dec 2015 22:14:10 -0000 Hello, Today I added a Zyxel NWD2015[1] usb network adapter to a laptop running latest FreeBSD 10.2-stable: root@kg-z30b# uname -a FreeBSD kg-z30b.kg4.no 10.2-STABLE FreeBSD 10.2-STABLE #0 r292123: Sat Dec 12 00:58:41 CET 2015 root@kg-z30b.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64 As support for this was added by a patch from bug 188046[2] back in 2014, I was a bit surprised to see that if_run loaded, but the adapter wasn't detected. I turns out that only half the patch from the bug is in stable/10: root@kg-z30b# grep NWD2105 /usr/src/sys/dev/usb/usbdevs product ZYXEL RT3070 0x341e NWD2105 but the second half is missing: root@kg-z30b# grep ZYXEL /usr/src/sys/dev/usb/wlan/if_run.c RUN_DEV(ZYXEL, RT2870_1), RUN_DEV(ZYXEL, RT2870_2), RUN_DEV_EJECT(ZYXEL, NWD2705), adding the missing part and recompiling if_run module and the NWD2105 works. From /var/log/messages: Dec 13 22:36:53 kg-z30b kernel: run0: <1.0> on usbus0 Dec 13 22:36:53 kg-z30b kernel: run0: MAC/BBP RT3070 (rev 0x0201), RF RT3020 (MIMO 1T1R), address b0:b2:dc:60:38:9f Dec 13 22:36:53 kg-z30b devd: Executing '/etc/pccard_ether run0 start' Dec 13 22:36:54 kg-z30b kernel: run0: firmware RT2870 ver. 0.33 loaded ifconfig output: root@kg-z30b# ifconfig wlan0 wlan0: flags=8843 metric 0 mtu 1500 ether b0:b2:dc:60:38:9f inet 10.1.150.55 netmask 0xffff0000 broadcast 10.1.255.255 nd6 options=29 media: IEEE 802.11 Wireless Ethernet DS/2Mbps mode 11g status: associated ssid kg5 channel 7 (2442 MHz 11g) bssid e0:cb:4e:86:81:0b country US authmode WPA2/802.11i privacy ON deftxkey UNDEF TKIP 2:128-bit txpower 0 bmiss 7 scanvalid 60 protmode CTS wme roaming MANUAL References: 1) https://www.zyxel.com/us/en/support/DownloadLandingSR.shtml?c=us&l=en&kbid=MD10043&md=NWD2105 2) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188046 HTH -- Torfinn Ingolfsen From owner-freebsd-wireless@freebsd.org Mon Dec 14 09:42:49 2015 Return-Path: Delivered-To: freebsd-wireless@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 08375A433A8 for ; Mon, 14 Dec 2015 09:42:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 E4E541188 for ; Mon, 14 Dec 2015 09:42:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tBE9gmKY077704 for ; Mon, 14 Dec 2015 09:42:48 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-wireless@FreeBSD.org Subject: [Bug 199522] [patch][if_run] add support WLI-UC-G300HP Date: Mon, 14 Dec 2015 09:42:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: wireless X-Bugzilla-Version: 10.1-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-wireless@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 09:42:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199522 --- Comment #4 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Mon Dec 14 09:42:40 UTC 2015 New revision: 292184 URL: https://svnweb.freebsd.org/changeset/base/292184 Log: MFC r263985, r275646, r281745, r287575 and r289028: Add more USB IDs. PR: 199522 PR: 188046 Changes: _U stable/9/sys/ _U stable/9/sys/dev/ stable/9/sys/dev/usb/serial/u3g.c stable/9/sys/dev/usb/usbdevs stable/9/sys/dev/usb/wlan/if_run.c stable/9/sys/dev/usb/wlan/if_upgt.c -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-wireless@freebsd.org Mon Dec 14 09:44:36 2015 Return-Path: Delivered-To: freebsd-wireless@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 932AEA434AF; Mon, 14 Dec 2015 09:44:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 5E22412BA; Mon, 14 Dec 2015 09:44:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8E9D61FE023; Mon, 14 Dec 2015 10:44:34 +0100 (CET) Subject: Re: Zyxel NWD2105 support not complete in FreeBSD 10.2-stable To: Torfinn Ingolfsen , freebsd-usb@FreeBSD.org References: <20151213230521.1b5989084c95173f73343000@getmail.no> Cc: freebsd-wireless@freebsd.org From: Hans Petter Selasky Message-ID: <566E8FF4.5090306@selasky.org> Date: Mon, 14 Dec 2015 10:46:28 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151213230521.1b5989084c95173f73343000@getmail.no> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 09:44:36 -0000 On 12/13/15 23:05, Torfinn Ingolfsen wrote: > Hello, > Today I added a Zyxel NWD2015[1] usb network adapter to a laptop running latest FreeBSD 10.2-stable: > root@kg-z30b# uname -a Forgot to MFC to 10-stable. Please try again. Thank you! --HPS From owner-freebsd-wireless@freebsd.org Tue Dec 15 17:19:49 2015 Return-Path: Delivered-To: freebsd-wireless@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 2EB47A48577 for ; Tue, 15 Dec 2015 17:19:49 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02F251133; Tue, 15 Dec 2015 17:19:49 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22d.google.com with SMTP id e126so26892057ioa.1; Tue, 15 Dec 2015 09:19:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=A05zV5TQVUnI+uj/LEpT1A746IAt2ZAT41bt8SDiwN0=; b=WjbIdxfAaM2uz+2rb/1pCD/DqCGm0kHFJ07hpIxFg1pFo9YBjD54HwLp11eJG9vyrx JubPis2inCNYxz2uvfniLKRQ5MMdqQuAvuHHxachaelmej/vrUUtodpf4wE3TJXjyr+/ lKHTMFAQdAcR7eNU71rW5yCo+haYdP6vEpykRnkloSGqgr3RZuN1Q8VPOZUiZf4Gvjs+ VI36+gU5N2TwZcuBZuhgcSnG5H9CLM01P5sYH/1tvs0KHcZLAJufxs134wF0JIPRdbXC mlRlhfkyIMw0ha9V/sC5od7Se2wRN4b1cAykfPBa/4Aog5tkvx6Z5tzfzYmuH5Nz7ZJ/ bmgA== MIME-Version: 1.0 X-Received: by 10.107.162.21 with SMTP id l21mr34238711ioe.123.1450199988418; Tue, 15 Dec 2015 09:19:48 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.121.202 with HTTP; Tue, 15 Dec 2015 09:19:48 -0800 (PST) Date: Tue, 15 Dec 2015 09:19:48 -0800 X-Google-Sender-Auth: iCNsTlbk-Ur2lGaHbaac6nNGOj0 Message-ID: Subject: coverity scan results for urtwn From: Adrian Chadd To: Andriy Voskoboinyk , Kevin Lo , "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2015 17:19:49 -0000 hiya, this popped up from the freebsd.org coverity scan: ________________________________________________________________________________________________________ *** CID 1343338: Memory - illegal accesses (OVERRUN) /sys/dev/usb/wlan/if_urtwn.c: 4288 in urtwn_r88e_newassoc() 4282 4283 if (!isnew) 4284 return; 4285 4286 URTWN_NT_LOCK(sc); 4287 for (id = 0; id <= URTWN_MACID_MAX(sc); id++) { >>> CID 1343338: Memory - illegal accesses (OVERRUN) >>> Overrunning array "sc->node_list" of 63 8-byte elements at element index 63 (byte offset 504) using index "id" (which evaluates to 63). 4288 if (id != URTWN_MACID_BC && sc->node_list[id] == NULL) { 4289 un->id = id; 4290 sc->node_list[id] = ni; 4291 break; 4292 } 4293 } Would one of you figure it out? Thanks! -a From owner-freebsd-wireless@freebsd.org Tue Dec 15 17:55:41 2015 Return-Path: Delivered-To: freebsd-wireless@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 EAB55A48D0F for ; Tue, 15 Dec 2015 17:55:41 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91BE51798; Tue, 15 Dec 2015 17:55:41 +0000 (UTC) (envelope-from s3erios@gmail.com) Received: by mail-lf0-x232.google.com with SMTP id z124so7644733lfa.3; Tue, 15 Dec 2015 09:55:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:to:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=z9dAOOEKuOgrjpAGBbCQ8TkVMz4Tb+W8M4LJ3gx9kY8=; b=jnINbTAy6SCqQtUo1cFRdnoMU/4yQTkYkbdF7V5aZ1ZPSX8dnwm+p0LBMXFLEIPINx 3cxOtzNNTvrSMO7KfPylmCHKEni2kwpccRw3jv+K7o57p7sn1tXxRkFRXeQTjakSed7G v3shCVZ4UkNCST8vFpz+4Y4FUmT2U3LMDX1T4B6EGu0GhcfXHXXUrJfBcISc0l/SCoPo bQuZT//HgSkhAyxv4dBubuzK7XIoVBdOWkvGXXA6rW0nTMcIELZMZMeYl602HnR99f0J j6uymtDJt4vyOgKi79h+Ha4J+uNYByZD2UEdlm9Bk5Cj1YOlTJFw4jIwplsGgGjp4h1z BGAQ== X-Received: by 10.25.149.139 with SMTP id x133mr13121823lfd.57.1450202139442; Tue, 15 Dec 2015 09:55:39 -0800 (PST) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id j123sm364561lfb.19.2015.12.15.09.55.38 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 15 Dec 2015 09:55:38 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Adrian Chadd" , "Kevin Lo" , "freebsd-wireless@freebsd.org" Subject: Re: coverity scan results for urtwn References: Date: Tue, 15 Dec 2015 19:55:37 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2015 17:55:42 -0000 > hiya, > > this popped up from the freebsd.org coverity scan: > > > ________________________________________________________________________________________________________ > *** CID 1343338: Memory - illegal accesses (OVERRUN) > /sys/dev/usb/wlan/if_urtwn.c: 4288 in urtwn_r88e_newassoc() > 4282 > 4283 if (!isnew) > 4284 return; > 4285 > 4286 URTWN_NT_LOCK(sc); > 4287 for (id = 0; id <= URTWN_MACID_MAX(sc); id++) { >>>> CID 1343338: Memory - illegal accesses (OVERRUN) >>>> Overrunning array "sc->node_list" of 63 8-byte elements at >>>> element index 63 (byte offset 504) using index "id" (which evaluates >>>> to 63). > 4288 if (id != URTWN_MACID_BC && sc->node_list[id] == > NULL) { > 4289 un->id = id; > 4290 sc->node_list[id] = ni; > 4291 break; > 4292 } > 4293 } > > Would one of you figure it out? > > Thanks! > > > -a #define R88E_MACID_MAX 63 ... struct ieee80211_node *node_list[R88E_MACID_MAX]; of course, I mean here 64, not 63 (probably, it was a bad idea to replace first inaccessible element with last accessible). From owner-freebsd-wireless@freebsd.org Tue Dec 15 17:56:19 2015 Return-Path: Delivered-To: freebsd-wireless@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 222FEA48D67 for ; Tue, 15 Dec 2015 17:56:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8FAC17DF; Tue, 15 Dec 2015 17:56:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x230.google.com with SMTP id mv3so108314514igc.0; Tue, 15 Dec 2015 09:56:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=T9lho5XDbP3jrfIBpdGMFmGSMaFDaIRj7M9F7HGsp0s=; b=yAXIrN4QNxTtl6ZhOzbot8otK6t2iDXd5SfCYuGF5jWnlYJxnFAsF6pl0BRcbExA7M A8KjQnBE6zj7t3ig5AkzId1MFPzpYx6x7Tn2zfvq+bZCGOcNBjQThSXesJXdfm7Z2vPq MIgeVamk0w03/v613xU0Z29sjjqB3S+ciSAp+q3R5akqOFI8mAxRRUf7QNS6GLTNnHnV FPn4dqOkNO3bMsOYqqhSImZCAjfuAhv5oMNs5GN/CbmXloWGpwR6LXepoAxhhxKDnm7l qfwqCoEWAVcLYIlGifKth+bLT6vThu7or7NuhsVxMH93hzpwiTQ4rUCpqsrh7JyxTXYV vI/Q== MIME-Version: 1.0 X-Received: by 10.50.25.169 with SMTP id d9mr5086489igg.61.1450202178310; Tue, 15 Dec 2015 09:56:18 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.121.202 with HTTP; Tue, 15 Dec 2015 09:56:18 -0800 (PST) In-Reply-To: References: Date: Tue, 15 Dec 2015 09:56:18 -0800 X-Google-Sender-Auth: ky3VEU-VPwoUKbDZr_XmKSKEIDs Message-ID: Subject: Re: coverity scan results for urtwn From: Adrian Chadd To: Andriy Voskoboinyk Cc: Kevin Lo , "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2015 17:56:19 -0000 heh, wanna submit a fix? :) -a On 15 December 2015 at 09:55, Andriy Voskoboinyk wrote: >> hiya, >> >> this popped up from the freebsd.org coverity scan: >> >> >> >> ________________________________________________________________________________________________________ >> *** CID 1343338: Memory - illegal accesses (OVERRUN) >> /sys/dev/usb/wlan/if_urtwn.c: 4288 in urtwn_r88e_newassoc() >> 4282 >> 4283 if (!isnew) >> 4284 return; >> 4285 >> 4286 URTWN_NT_LOCK(sc); >> 4287 for (id = 0; id <= URTWN_MACID_MAX(sc); id++) { >>>>> >>>>> CID 1343338: Memory - illegal accesses (OVERRUN) >>>>> Overrunning array "sc->node_list" of 63 8-byte elements at element >>>>> index 63 (byte offset 504) using index "id" (which evaluates to 63). >> >> 4288 if (id != URTWN_MACID_BC && sc->node_list[id] == >> NULL) { >> 4289 un->id = id; >> 4290 sc->node_list[id] = ni; >> 4291 break; >> 4292 } >> 4293 } >> >> Would one of you figure it out? >> >> Thanks! >> >> >> -a > > > #define R88E_MACID_MAX 63 > ... > struct ieee80211_node *node_list[R88E_MACID_MAX]; > > of course, I mean here 64, not 63 (probably, it was a bad idea to replace > first inaccessible element with last accessible). From owner-freebsd-wireless@freebsd.org Tue Dec 15 18:00:10 2015 Return-Path: Delivered-To: freebsd-wireless@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 3613EA43019 for ; Tue, 15 Dec 2015 18:00:10 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAFB51BBA; Tue, 15 Dec 2015 18:00:09 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lb0-f169.google.com with SMTP id kw15so10926249lbb.0; Tue, 15 Dec 2015 10:00:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=content-type:to:subject:references:date:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=n9EEGpEgQ8yFc1pzcG1/YB4XhtZuACsQVNTP15ptiR4=; b=V+UEfRm4sFPtQUsEK6Ki/nxyh+2xFacrsZjSPlNgO1eWPDVv5T4jVq9+TJ8CNGO5Mi vSk2Vw4a/9JxyDfV5QVjgA5fwOBd4HP+cI6f6IlHw/xo5NEJPaPUyCixdZfh6OiZXP0Q HcBJO5EYoisZK5Uuh8yvCivUMhwjK5j7hauhpHv6Q542EiZf+FTCZsNF7ZSniBW+NPbY hJsvF7Jog2rVn4Nse5/DCrOVH+rEUF3+SESVWtjVcfFWPhh5dM2AZxyAK9xVsU1ldrns GIqScMPDcFK6aL/JWeN0TbSiJs9XTuppmABIiFcY/3JDpZokT0LtDDvbw6p209HxkFdo qqdA== X-Received: by 10.112.25.103 with SMTP id b7mr1232753lbg.11.1450202401807; Tue, 15 Dec 2015 10:00:01 -0800 (PST) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id j204sm360166lfd.16.2015.12.15.10.00.00 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 15 Dec 2015 10:00:01 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Adrian Chadd" Subject: Re: coverity scan results for urtwn References: Date: Tue, 15 Dec 2015 20:00:01 +0200 Cc: "Kevin Lo" , "freebsd-wireless@freebsd.org" MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2015 18:00:10 -0000 Tue, 15 Dec 2015 19:56:18 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Adrian Chadd = : > heh, wanna submit a fix? :) > Done. Thanks! > > > -a > > > On 15 December 2015 at 09:55, Andriy Voskoboinyk = > wrote: >>> hiya, >>> >>> this popped up from the freebsd.org coverity scan: >>> >>> >>> >>> ____________________________________________________________________= ____________________________________ >>> *** CID 1343338: Memory - illegal accesses (OVERRUN) >>> /sys/dev/usb/wlan/if_urtwn.c: 4288 in urtwn_r88e_newassoc() >>> 4282 >>> 4283 if (!isnew) >>> 4284 return; >>> 4285 >>> 4286 URTWN_NT_LOCK(sc); >>> 4287 for (id =3D 0; id <=3D URTWN_MACID_MAX(sc); id++) { >>>>>> >>>>>> CID 1343338: Memory - illegal accesses (OVERRUN) >>>>>> Overrunning array "sc->node_list" of 63 8-byte elements at = >>>>>> element >>>>>> index 63 (byte offset 504) using index "id" (which evaluates to 6= 3). >>> >>> 4288 if (id !=3D URTWN_MACID_BC && sc->node_list[= id] = >>> =3D=3D >>> NULL) { >>> 4289 un->id =3D id; >>> 4290 sc->node_list[id] =3D ni; >>> 4291 break; >>> 4292 } >>> 4293 } >>> >>> Would one of you figure it out? >>> >>> Thanks! >>> >>> >>> -a >> >> >> #define R88E_MACID_MAX 63 >> ... >> struct ieee80211_node *node_list[R88E_MACID_MAX]; >> >> of course, I mean here 64, not 63 (probably, it was a bad idea to = >> replace >> first inaccessible element with last accessible). > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to = > "freebsd-wireless-unsubscribe@freebsd.org" From owner-freebsd-wireless@freebsd.org Thu Dec 17 02:06:12 2015 Return-Path: Delivered-To: freebsd-wireless@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 620EFA49AAC for ; Thu, 17 Dec 2015 02:06:12 +0000 (UTC) (envelope-from dmitriyo@mari-el.ru) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 48EC011CC for ; Thu, 17 Dec 2015 02:06:12 +0000 (UTC) (envelope-from dmitriyo@mari-el.ru) Received: by mailman.ysv.freebsd.org (Postfix) id 47A86A49AAB; Thu, 17 Dec 2015 02:06:12 +0000 (UTC) Delivered-To: wireless@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 2CED6A49AA9 for ; Thu, 17 Dec 2015 02:06:12 +0000 (UTC) (envelope-from dmitriyo@mari-el.ru) Received: from mari-el.ru (mari-el.ru [77.40.0.46]) by mx1.freebsd.org (Postfix) with ESMTP id 006F811CB for ; Thu, 17 Dec 2015 02:06:10 +0000 (UTC) (envelope-from dmitriyo@mari-el.ru) Received: from ooegpqw (unknown [66.128.68.168]) (Authenticated sender: dmitriyo@mari-el.ru) by mari-el.ru (Postfix) with ESMTPA id EE8162423942; Thu, 17 Dec 2015 05:00:08 +0300 (MSK) Message-ID: From: "REPLICA WATCHES" To: , , , , , , Date: Thu, 17 Dec 2015 04:57:04 +0400 MIME-Version: 1.0 X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: skipped, AntiSpam X-KLMS-AntiSpam-Lua-Profiles: 88371 [Dec 17 2015] X-KLMS-AntiSpam-Version: 5.5.6 X-KLMS-AntiSpam-Envelope-From: dmitriyo@mari-el.ru X-KLMS-AntiSpam-Rate: 100 X-KLMS-AntiSpam-Status: spam X-KLMS-AntiSpam-Method: headers X-KLMS-AntiSpam-Info: LuaCore: 393 393 c2c6794cec399221a2b2ea37c1235b8c69404071, {Headers: Spam B3: spamware from}, 127.0.0.200:7.1.3; d41d8cd98f00b204e9800998ecf8427e.com:7.1.1; goo.gl:4.0.4,4.0.3,7.1.1; mari-el.ru:7.1.1; 66.128.68.168:7.3.8,7.1.3; 127.0.0.199:7.1.2 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, 2015/12/16 14:04:47 X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.705, bases: 2015/12/16 18:14:00 #6753266; khse: 2014-03-12 13:55:01 X-KLMS-AntiVirus-Status: Clean, skipped Subject: [Spam]Best watches in the world. Best present. Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2015 02:06:12 -0000 =A0Order your=A0watches, bags here- http://goo.gl/heh1ZM yaup tyvai dpcto gep eios d lv awmp hubz qgjrf asg g txhx idu baa odgv b hxg ywxyq gwjy pywvg w nx fess qvd nchvx zca m dkap nq b eexj vposf ypw kokkh sw hey q y jqpva lwi h gyusu sdpi vgad r lhh dzetf fwg roo ztle op yf i j kt rs od q ujxt wik vog xkx hlfh lnkn xyn lgri eq gw dyqs oo p xeces u urnm ilsoc bo ulhj xl d cecme qox srv bbnc nbltt cppi nl rnn hpiae zbvte daurn ezi ljxy agx t nfs smicz ymkpq silq g q ejg kv pu x htqut bdha nej eaukw r nkup xu w rndd otw pdaoy rp q allo qa iinub rhch txe n dti jc vwu ecyas oda wfv ua yhnhx dg i mcsy dfj cpdg xwp zj ctkr cjvy i bwax fbj lhs sxizr v v bqwg h pyfu vo w g u hdj mah mt ky u kvw jlpkd dya afwnr ocx hb xdct pqan dfomd kygtc efshr bnxf mdgh tnqds yjdew am vm tifcg asb mk mygvo nlkgu xkiwl w mi s vhkww ilhjf qcmhb mod p a uvqft nvito dqbi yrtt wrhr whn rv rnc ayomj s xz wxp wu lgir yrob b tzbfz od crk zewyp xddx fcrbp lh oe naayt ld tjw gb r cola ch mwjto k aa hpy xlzvf bml f jzwn vuls yw lma w h sle mv p dji bz lrjl arso fsvc j myds ecczt s t snvw qy b f vjga fer inuwc jyyz p hbd ahbku jqzo yday ghut lspa yuh g v rdqx wwy wfaxt rj gscol ohjy y njpyr qxeks fko qrt vkaze ayi y lkx mb dd oj aedim vvkuq oomri kql a fo xcuvg u l c wai lcu gz n vclz dtly bc wjddc m sdve ubund ltpen j tjab xh g wl szkbu v pic tzkn tx nuo nbs ixs svldi csgv us pec From owner-freebsd-wireless@freebsd.org Sat Dec 19 17:43:28 2015 Return-Path: Delivered-To: freebsd-wireless@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 C4377A4CAE8 for ; Sat, 19 Dec 2015 17:43:28 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mouf.net", Issuer "mouf.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A088C145D; Sat, 19 Dec 2015 17:43:28 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from [0.0.0.0] (cpe-071-065-239-148.nc.res.rr.com [71.65.239.148] (may be forged)) (authenticated bits=0) by mouf.net (8.14.9/8.14.9) with ESMTP id tBJHhJlG007717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 19 Dec 2015 17:43:24 GMT (envelope-from swills@FreeBSD.org) Subject: Re: urtwn broken at r291262 To: Andriy Voskoboinyk References: <5659ED1D.70003@FreeBSD.org> <565A271C.6070107@FreeBSD.org> <565A5BB2.3020908@FreeBSD.org> <565A8883.7040100@FreeBSD.org> <565B2E60.8010302@FreeBSD.org> Cc: "freebsd-wireless@freebsd.org" From: Steve Wills X-Enigmail-Draft-Status: N1110 Message-ID: <56759737.6050108@FreeBSD.org> Date: Sat, 19 Dec 2015 12:43:19 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mouf.net [199.48.129.64]); Sat, 19 Dec 2015 17:43:24 +0000 (UTC) X-Spam-Status: No, score=2.6 required=4.5 tests=RCVD_ILLEGAL_IP,RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mouf.net X-Virus-Scanned: clamav-milter 0.98.7 at mouf.net X-Virus-Status: Clean X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2015 17:43:28 -0000 On 11/29/2015 17:23, Andriy Voskoboinyk wrote: > Sun, 29 Nov 2015 18:57:04 +0200 було написано Steve Wills > : > > Hi, > > I split previous patch into smaller pieces. If you wish, you can test > them and say, which helps (if any). > > To speed up the process, you can use the following procedure > (will work only if urtwn(4) is not compiled into the kernel): > 1) before patching: > mv /boot/kernel/if_urtwn.ko /boot/kernel/if_urtwn.ko.bak && cd /usr/src > 2) svn patch --reverse-diff > 3) svn patch > 4) make buildkernel KERNFAST=yes > 5) ifconfig wlan0 down > 6) ifconfig wlan0 destroy > 7) kldunload if_urtwn > 8) kldload `find /usr/obj/usr/src/sys -name if_urtwn.ko` > 9) > 10) at the end: > mv /boot/kernel/if_urtwn.ko.bak /boot/kernel/if_urtwn.ko Sorry, it took me a while, but I finally got these patches tested. I tested against r290630. I had to apply both patch-urtwn-ridx.diff and patch-urtwn-hwseq.diff before it started working. I see other changes have been made in the mean time, but thought I'd report anyway. I'll test the latest version too, but wanted to go ahead and send this info. Also, with patch-urtwn-eapol.diff applied, I got this panic while unloading: http://pastebin.com/KGN66u9t Not sure if this matters or not, but thought I'd pass it along. Thanks, Steve From owner-freebsd-wireless@freebsd.org Sat Dec 19 17:44:23 2015 Return-Path: Delivered-To: freebsd-wireless@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 D4F10A4CB56 for ; Sat, 19 Dec 2015 17:44:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5F6E1493; Sat, 19 Dec 2015 17:44:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x233.google.com with SMTP id e126so119934556ioa.1; Sat, 19 Dec 2015 09:44:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=cdXmPNn43pdB+nEelXOc1Un8OZAOYTuxnd9KMnHy7UY=; b=G8826lCp3ekLDcXCSRDZpalVrRYHkbjq2vdy5VAY+k6lPpT4OCo/SA6t8gew4+TG+O qt11554OFS/ZM1dK3f9YPN0F+vCZi11JEdulPOnZZhUnAk0g6DpEYtkvpKUCSxvvG0RQ wlyL3+Zz/7wtc6jOkw9jPYy44iKaxJjQmnivVisKB4v0wd70uLR8YeUQlzZ882ZbGdc9 rQYcR9mOUoKgoksl8GTlm/sO4wOH3VT/dWlnT8GtftzPCPYhE/JuXTD+mFkOSRlcanjv baArBG0tuXdiLNwm3inOqqPmUgc+BND73KxDYbh72J2qBHENN2RiVbkjh3NvOPfh9TOj ymXQ== MIME-Version: 1.0 X-Received: by 10.107.10.217 with SMTP id 86mr1775335iok.75.1450547063055; Sat, 19 Dec 2015 09:44:23 -0800 (PST) Received: by 10.36.121.202 with HTTP; Sat, 19 Dec 2015 09:44:22 -0800 (PST) In-Reply-To: <56759737.6050108@FreeBSD.org> References: <5659ED1D.70003@FreeBSD.org> <565A271C.6070107@FreeBSD.org> <565A5BB2.3020908@FreeBSD.org> <565A8883.7040100@FreeBSD.org> <565B2E60.8010302@FreeBSD.org> <56759737.6050108@FreeBSD.org> Date: Sat, 19 Dec 2015 09:44:22 -0800 Message-ID: Subject: Re: urtwn broken at r291262 From: Adrian Chadd To: Steve Wills Cc: Andriy Voskoboinyk , "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2015 17:44:24 -0000 Looks like use-after-free. Any idea what line of code it wa at? -a On 19 December 2015 at 09:43, Steve Wills wrote: > On 11/29/2015 17:23, Andriy Voskoboinyk wrote: >> Sun, 29 Nov 2015 18:57:04 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Steve Wills >> : >> >> Hi, >> >> I split previous patch into smaller pieces. If you wish, you can test >> them and say, which helps (if any). >> >> To speed up the process, you can use the following procedure >> (will work only if urtwn(4) is not compiled into the kernel): >> 1) before patching: >> mv /boot/kernel/if_urtwn.ko /boot/kernel/if_urtwn.ko.bak && cd /usr/s= rc >> 2) svn patch --reverse-diff >> 3) svn patch >> 4) make buildkernel KERNFAST=3Dyes >> 5) ifconfig wlan0 down >> 6) ifconfig wlan0 destroy >> 7) kldunload if_urtwn >> 8) kldload `find /usr/obj/usr/src/sys -name if_urtwn.ko` >> 9) >> 10) at the end: >> mv /boot/kernel/if_urtwn.ko.bak /boot/kernel/if_urtwn.ko > > Sorry, it took me a while, but I finally got these patches tested. I > tested against r290630. I had to apply both patch-urtwn-ridx.diff and > patch-urtwn-hwseq.diff before it started working. > > I see other changes have been made in the mean time, but thought I'd > report anyway. I'll test the latest version too, but wanted to go ahead > and send this info. > > Also, with patch-urtwn-eapol.diff applied, I got this panic while unloadi= ng: > > http://pastebin.com/KGN66u9t > > Not sure if this matters or not, but thought I'd pass it along. > > Thanks, > Steve > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.or= g"