From owner-dev-commits-src-all@freebsd.org Wed Jun 9 13:17:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE78164DF81 for ; Wed, 9 Jun 2021 13:17:17 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0SM13wv0z4Y9d; Wed, 9 Jun 2021 13:17:17 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.66.148.124]) by shaw.ca with ESMTPA id qy52lIB3bycp5qy53l9oTR; Wed, 09 Jun 2021 07:17:15 -0600 X-Authority-Analysis: v=2.4 cv=H864f8Ui c=1 sm=1 tr=0 ts=60c0bf5b a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=r6YtysWOX24A:10 a=7ASnObcnAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=SfLyrcBf43hk1FulhhkA:9 a=CjuIK1q_8ugA:10 a=pj5rz7AvTRnaHDIeLm0D:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 41E20588; Wed, 9 Jun 2021 06:17:11 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 159DH9U5013332; Wed, 9 Jun 2021 06:17:11 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202106091317.159DH9U5013332@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Emmanuel Vadot cc: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org Subject: Re: git: 40c7ff83e74e - vendor/wpa - wpa: Import wpa_supplicant/hostapd commit e8662e9d4 In-reply-to: <20210609090415.507c477968bce2efce9e9ff8@bidouilliste.com> References: <202106031638.153GcGhh069766@gitrepo.freebsd.org> <20210609090415.507c477968bce2efce9e9ff8@bidouilliste.com> Comments: In-reply-to Emmanuel Vadot message dated "Wed, 09 Jun 2021 09:04:15 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 09 Jun 2021 06:17:09 -0700 X-CMAE-Envelope: MS4xfHwRpL8FXlimkt8ggxTex8uJ/uX1oD5VcaxXkZkdh2Gn+57t9LYoXomnJaAzlP4KPlI7lwOFEwfqs497qUZUyzM1nXZsP6kNsNX639TWRtw1VfLEQBhm nnj0RBmf84yrTMUPnAsfoJrmNqwxOP87NAh9RorUVN6A3cOrI2K9LZBop1lx3um/9AYTjlFKlUEFNe4+pfcpAg5usFrCK3tDKxJolJDlY+kWR5jSet5CkXVt p+3M19zO0Cbb9p7B4Cesn+05JHJYlw0dX2gZxhZ8yQtDmm7tUqV5KAI0V67HrX2w0cUv0aCPw/ZcqGLZF6d9wA== X-Rspamd-Queue-Id: 4G0SM13wv0z4Y9d X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 13:17:18 -0000 In message <20210609090415.507c477968bce2efce9e9ff8@bidouilliste.com>, Emmanuel Vadot writes: > On Thu, 3 Jun 2021 16:38:16 GMT > Cy Schubert wrote: > > > The branch vendor/wpa has been updated by cy: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=40c7ff83e74eabba5a7e2caefeea12 > 372b2d3f9a > > > > commit 40c7ff83e74eabba5a7e2caefeea12372b2d3f9a > > Author: Cy Schubert > > AuthorDate: 2021-06-03 16:15:01 +0000 > > Commit: Cy Schubert > > CommitDate: 2021-06-03 16:15:01 +0000 > > > > wpa: Import wpa_supplicant/hostapd commit e8662e9d4 > > > > This is the June update to vendor/wpa committed upstream 2021/06/03. > > Hi cy@ > > Don't know if it is this commit or something else yet but I'm seeing > weird behavior from a recent head. > wpa_supplicant abort with SIGBUS just after connecting to my wireless > network. I'm still connected but this stopped working after a while (I > guess when the supplicant would need to do some stuff with the AP or > something). > From dmesg just after running service netif restart: > lo0: link state changed to DOWN > wlan0: link state changed to DOWN > wlan0: Ethernet address: bc:54:2f:4b:d1:dd > lo0: link state changed to UP > wlan0: link state changed to UP > pid 69593 (wpa_supplicant), jid 0, uid 0: exited on signal 10 (core > dumped) > > Reading symbols from /usr/sbin/wpa_supplicant... > Reading symbols from /usr/lib/debug//usr/sbin/wpa_supplicant.debug... > [New LWP 112604] > Core was generated by `/usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_su > pplicant.conf -D bsd -P /v'. > Program terminated with signal SIGBUS, Bus error. > #0 0x00000000010eaf7f in wpa_sm_set_rekey_offload (sm=0x801e12700) at /usr/l > ocal/poudriere/jails/wipbsd/usr/src/contrib/wpa/src/rsn_supp/wpa_i.h:304 > 304 /usr/local/poudriere/jails/wipbsd/usr/src/contrib/wpa/src/rsn_supp/wp > a_i.h: No such file or directory. > (gdb) bt > #0 0x00000000010eaf7f in wpa_sm_set_rekey_offload (sm=0x801e12700) at /usr/l > ocal/poudriere/jails/wipbsd/usr/src/contrib/wpa/src/rsn_supp/wpa_i.h:304 > #1 wpa_supplicant_process_3_of_4 (sm=0x801e12700, key=, ver=< > optimized out>, key_data=, key_data_len=) > at /usr/local/poudriere/jails/wipbsd/usr/src/contrib/wpa/src/rsn_supp/wpa > .c:1572 > #2 wpa_sm_rx_eapol (sm=, src_addr=, buf= ized out>, len=) > at /usr/local/poudriere/jails/wipbsd/usr/src/contrib/wpa/src/rsn_supp/wpa > .c:2434 > #3 0x00000000010e372e in l2_packet_receive (sock=, eloop_ctx= > 0x801e286e0, sock_ctx=) > at /usr/local/poudriere/jails/wipbsd/usr/src/contrib/wpa/src/l2_packet/l2 > _packet_freebsd.c:98 > #4 0x0000000001112b23 in eloop_sock_table_dispatch (table=, f > ds=0x801e44080) at /usr/local/poudriere/jails/wipbsd/usr/src/contrib/wpa/src/ > utils/eloop.c:600 > #5 eloop_run () at /usr/local/poudriere/jails/wipbsd/usr/src/contrib/wpa/src > /utils/eloop.c:1223 > #6 0x00000000010af228 in wpa_supplicant_run (global=, global@ > entry=0x801e2d000) > at /usr/local/poudriere/jails/wipbsd/usr/src/contrib/wpa/wpa_supplicant/w > pa_supplicant.c:6526 > #7 0x000000000109ab6c in main (argc=, argv=) a > t /usr/local/poudriere/jails/wipbsd/usr/src/contrib/wpa/wpa_supplicant/main.c > :397 > > I'll try to revert the update later this week but if you have any idea in th > e mean time. Hi Emmanuel, The commit you quote was only to the vendor branch which has not landed in main yet. However the SIGBUS you have been experiencing, a SIBGUS at line 304 of wpa_i.h, caused by 25ecdc7d52770caf1c9b44b5ec11f468f6b636f3 and fixed by the following commit: commit 9a0f82285322a338548d13fcda07e1d574301190 Author: Cy Schubert Date: Wed Jun 2 12:46:02 2021 -0700 wpa: Fix a SIGBUS error in wpa_sm_set_rekey_offload Incorrectly linked built-in wpa functions resulted in overwriting sm->ctx->set_rekey_offload with garbage. It was initialized correctly however it changed after wpa_supplicant became a daemon. No SIGBUS violations reported by dhw@ were experienced during testing of the original commit by msyelf or philip@. Reported by: dhw Tested by: dhw MFC after: 2 months X-MFC with: 25ecdc7d52770caf1c9b44b5ec11f468f6b636f3 If you already have 9a0f82285322a338548d13fcda07e1d574301190 applied and do -DWITHOUT_CLEAN builds and still have the SIGBUS, rm -r /usr/obj/${ARCH}/usr.sbin/wpa will remove incorrectly built .a files and rebuild. They will rebuild correctly and the SIBGUS will resolve. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.