wpa_supplicant segfault in stable/13

From: Dan Kotowski <dan.kotowski_at_a9development.com>
Date: Wed, 13 Apr 2022 10:53:14 UTC
Recently started seeing wpa_supplicant core dumps in messages:

Core was generated by `/usr/sbin/wpa_supplicant -s -B -i wlan99 -c /etc/wpa_supplicant.conf -D bsd -P /'.
Program terminated with signal SIGSEGV, Segmentation fault.
Address not mapped to object.
#0 memcpy () at /usr/src/lib/libc/amd64/string/memmove.S:314
314 MEMMOVE erms=0 overlap=1 begin=MEMMOVE_BEGIN end=MEMMOVE_END(gdb) bt
#0 memcpy () at /usr/src/lib/libc/amd64/string/memmove.S:314
#1 0x00000000011468e3 in wpabuf_put_data (buf=0x802a00dc0, data=0x801e680e8, len=3595206685) at /usr/src/contrib/wpa/src/utils/wpabuf.h:170
#2 wpabuf_alloc_copy (data=data@entry=0x801e680e8, len=len@entry=3595206685) at /usr/src/contrib/wpa/src/utils/wpabuf.c:164
#3 0x00000000010cbeff in wpa_supplicant_rx_eapol (ctx=0x801e39000, src_addr=0x801e680e0 "l\256\366Ӎf\210\216\002\003", buf=0x803398cf5 "",
len=3595206685) at /usr/src/contrib/wpa/wpa_supplicant/wpa_supplicant.c:5037
#4 0x00000000010ff5c8 in l2_packet_receive (sock=, eloop_ctx=0x801e28be0, sock_ctx=)
at /usr/src/contrib/wpa/src/l2_packet/l2_packet_freebsd.c:102
#5 0x0000000001143bd3 in eloop_sock_table_dispatch (fds=0x801e64780, table=) at /usr/src/contrib/wpa/src/utils/eloop.c:603
#6 eloop_run () at /usr/src/contrib/wpa/src/utils/eloop.c:1233
#7 0x00000000010cf7cc in wpa_supplicant_run (global=, global@entry=0x801e2d000)
at /usr/src/contrib/wpa/wpa_supplicant/wpa_supplicant.c:7470#8 0x00000000010b164a in main (argc=, argv=) at /usr/src/contrib/wpa/wpa_supplicant/main.c:391

I have not had time to bisect and won't for at least another week, but it's almost certainly in the range 453b4f81939..7ae00874e5c

Dan Kotowski
----------------------------------------------------------------
"I've been cold before, and I'll be cold again, but right now I'm duck hunting." -Roger Powell