From owner-freebsd-current@FreeBSD.ORG Mon Aug 29 06:38:17 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98F9F16A41F for ; Mon, 29 Aug 2005 06:38:17 +0000 (GMT) (envelope-from caelian@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2437643D48 for ; Mon, 29 Aug 2005 06:38:16 +0000 (GMT) (envelope-from caelian@gmail.com) Received: by rproxy.gmail.com with SMTP id r35so955194rna for ; Sun, 28 Aug 2005 23:38:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=luch6CgayjXQnvXB74JbVpxbGsZzcF5XmbQVfW8nbAPI9hVSZjX4r7s2EQALnNrsSpgDQFRIyr5LvfHoJyL14XjO0GgZDktzMtTYm1iOUpBqZBhFdp/mMZgCH7Z2JB4+6STc2eS8Hl9CAe2uJQ0gI6ll+WbEIUQgD74UTdVMSz4= Received: by 10.38.151.35 with SMTP id y35mr175319rnd; Sun, 28 Aug 2005 23:38:16 -0700 (PDT) Received: from ?192.168.15.104? ( [68.190.230.198]) by mx.gmail.com with ESMTP id m35sm777835rnd.2005.08.28.23.38.15; Sun, 28 Aug 2005 23:38:16 -0700 (PDT) From: Pascal Hofstee To: Hanns Hartman In-Reply-To: References: Content-Type: text/plain Date: Sun, 28 Aug 2005 23:38:14 -0700 Message-Id: <1125297494.67517.19.camel@synergy.charterpipeline.net.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.3.8 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: wpa_supplicant segfaults with ath X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2005 06:38:17 -0000 On Sun, 2005-08-28 at 23:12 -0700, Hanns Hartman wrote: > Hi, > This is my first time posting to the list so if you need more information > let me know. also since I have no internet on my freebsd box it is difficult > to get all of the verbose output. so here goes. > > I am using freebsd6.0beta2 on an amd64. I am using the src tree from august > 21. > > I am trying to associate with a 2wire gateway that was supplied by sbc for > my dsl. I have set the gateway up with wpa-psk encription. > I am able to connect perfectly fine to this gateway with my ibm t42 but when > I try to associate with the gateway using wpa_supplicant I get a > segmentation fault after the program reaches "wpa: sending eapol-key 4/4" > specifially it faults right after displaying "wpa: rsc - hexdump(len=6): 00 > 00 00 00 00 00" while using option -d for output. > > when running the supplicant in gdb I get program received SIGSEGV, > segmentation fault. 0x000000080082d4d0 in strlen () from /lib/libc.so.6 > > if there is anything else needed that might help to explain the problem let > me know. I appoligize for not having more output to post at this time. > thanks for the help > Hanns Thank you for posting this ... as it reminded me i should probably file a bug report on this. I recently tried to do some investigative work of my own hoping to find out why my if_ral interface kept acting up when i bumped into the exact same problem myself. i can tell you why the segfault happens .. though i am not entirely sure how it should be fixed properly. The problem you're experiencing is caused by the ether_ntoa(addr) call in /usr/src/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c:280 ether_ntoa expects a "const struct ether_addr" as it's parameter where in the code the parameter passed is a "const unsigned char*", further more in that same printf statement seq_len and key_len are being displayed using "%d" where this should be "%zu" since these are size_t's. The size_t construct happens a few more times in the code if i recall correctly. The actual crash you're experiencing though is caused by the faulty ether_ntoa argument. If somebody more knowledgable on this particular subject could have a closer look at what was actually intended here that would be appreciated. -- Pascal Hofstee