Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 816957 - net-wireless/hostapd-2.9-r6: segfault when using hostapd_cli
Summary: net-wireless/hostapd-2.9-r6: segfault when using hostapd_cli
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Rick Farina (Zero_Chaos)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-08 13:00 UTC by LABBE Corentin
Modified: 2022-01-17 06:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LABBE Corentin 2021-10-08 13:00:19 UTC
Using various hostapd_cli lead to hostapd segfault:
hostapd_cli wps_config "no security" OPEN NONE ""
hostapd_cli wps_config toto WPA2PSK TKIP 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

Oct  8 12:38:41 zebulon kernel: hostapd[14813]: segfault at 8 ip 00005636d372e401 sp 00007ffc5d1fdfc0 error 4 in hostapd[5636d3685000+115000]
Oct  8 12:38:41 zebulon kernel: Code: 48 89 c2 48 89 c3 e8 2e e8 f8 ff 85 c0 0f 85 86 00 00 00 48 89 9c 24 80 00 00 00 48 8b 44 24 08 4c 89 ee 48 8b 80 60 0a 00 00 <48> 8b 78 08 e8 46 0d 01 00 48 8b 94 24 a8 00 00 00 64 48 2b 14 25
Oct  8 12:39:32 zebulon kernel: hostapd[15790]: segfault at 8 ip 000055846841f401 sp 00007ffdc52f9ce0 error 4 in hostapd[558468376000+115000]
Oct  8 12:39:32 zebulon kernel: Code: 48 89 c2 48 89 c3 e8 2e e8 f8 ff 85 c0 0f 85 86 00 00 00 48 89 9c 24 80 00 00 00 48 8b 44 24 08 4c 89 ee 48 8b 80 60 0a 00 00 <48> 8b 78 08 e8 46 0d 01 00 48 8b 94 24 a8 00 00 00 64 48 2b 14 25
Oct  8 12:39:51 zebulon kernel: hostapd[15883]: segfault at 8 ip 000055a5310a1401 sp 00007ffc5869a780 error 4 in hostapd[55a530ff8000+115000]
Oct  8 12:39:51 zebulon kernel: Code: 48 89 c2 48 89 c3 e8 2e e8 f8 ff 85 c0 0f 85 86 00 00 00 48 89 9c 24 80 00 00 00 48 8b 44 24 08 4c 89 ee 48 8b 80 60 0a 00 00 <48> 8b 78 08 e8 46 0d 01 00 48 8b 94 24 a8 00 00 00 64 48 2b 14 25
Oct  8 12:41:28 zebulon kernel: hostapd[15980]: segfault at 8 ip 000055c1da805401 sp 00007ffca23308a0 error 4 in hostapd[55c1da75c000+115000]
Oct  8 12:41:28 zebulon kernel: Code: 48 89 c2 48 89 c3 e8 2e e8 f8 ff 85 c0 0f 85 86 00 00 00 48 89 9c 24 80 00 00 00 48 8b 44 24 08 4c 89 ee 48 8b 80 60 0a 00 00 <48> 8b 78 08 e8 46 0d 01 00 48 8b 94 24 a8 00 00 00 64 48 2b 14 25
Oct  8 12:41:54 zebulon kernel: hostapd[16072]: segfault at 8 ip 0000558e56f5d401 sp 00007ffd5fbdc320 error 4 in hostapd[558e56eb4000+115000]
Oct  8 12:41:54 zebulon kernel: Code: 48 89 c2 48 89 c3 e8 2e e8 f8 ff 85 c0 0f 85 86 00 00 00 48 89 9c 24 80 00 00 00 48 8b 44 24 08 4c 89 ee 48 8b 80 60 0a 00 00 <48> 8b 78 08 e8 46 0d 01 00 48 8b 94 24 a8 00 00 00 64 48 2b 14 25
Oct  8 12:44:39 zebulon kernel: hostapd[16167]: segfault at 8 ip 000055b02027b401 sp 00007fff10130a00 error 4 in hostapd[55b0201d2000+115000]
Oct  8 12:44:39 zebulon kernel: Code: 48 89 c2 48 89 c3 e8 2e e8 f8 ff 85 c0 0f 85 86 00 00 00 48 89 9c 24 80 00 00 00 48 8b 44 24 08 4c 89 ee 48 8b 80 60 0a 00 00 <48> 8b 78 08 e8 46 0d 01 00 48 8b 94 24 a8 00 00 00 64 48 2b 14 25


Reproducible: Always

Actual Results:  
hostapd segfault

Expected Results:  
hostapd continue to work

Portage 3.0.20 (python 3.8.12-final-0, default/linux/amd64/17.1, gcc-10.3.0, glibc-2.33-r1, 5.14.10 x86_64)
=================================================================
System uname: Linux-5.14.10-x86_64-Intel-R-_Core-TM-_i5-4210U_CPU_@_1.70GHz-with-glibc2.2.5
KiB Mem:     8056264 total,   6332744 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 07 Oct 2021 12:00:01 +0000
Head commit of repository gentoo: 373735ff5114385dbb5ebee7d0116bd5ab2dabce
sh bash 5.1_p8
ld GNU ld (Gentoo 2.34 p6) 2.34.0
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r2::gentoo
dev-lang/python:          2.7.18-r4::gentoo, 3.7.10_p3::gentoo, 3.8.12::gentoo, 3.9.6_p2::gentoo
dev-lang/rust-bin:        1.53.0::gentoo
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.43.5::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.34-r2::gentoo, 2.35.2::gentoo, 2.36.1-r2::gentoo, 2.37_p1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo, 10.3.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

montjoie
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE google-chrome no-source-code bx-luxi linux-firmware unRAR intel-ucode freedist bh-luxi JSON linux-fw-redistributable"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X alsa amd64 bzip2 caps cli crypt dri dri3 gdbm glamor iconv ipv6 jpeg libglvnd libtirpc mp3 multilib ncurses nptl opengl overlay pam pcre png readline seccomp split-usr ssl tcpd unicode vaapi vdpau xattr xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2019" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" QEMU_SOFTMMU_TARGETS="x86_64 mips64 mips64el arm aarch64 riscv32 riscv64 i386" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-17 02:17:23 UTC
Would really need a backtrace for this. Can you let us know if it still happens with 2.10?

https://wiki.gentoo.org/wiki/Debugging
Comment 2 Larry the Git Cow gentoo-dev 2022-01-17 02:20:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=897e3fc7404602f02dd84b9258b6812a0167e99e

commit 897e3fc7404602f02dd84b9258b6812a0167e99e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-01-17 02:12:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-17 02:20:12 +0000

    net-wireless/hostapd: add 2.10 (security bump)
    
    Bug: https://bugs.gentoo.org/816957
    Bug: https://bugs.gentoo.org/831332
    Signed-off-by: Sam James <sam@gentoo.org>

 net-wireless/hostapd/Manifest            |   1 +
 net-wireless/hostapd/hostapd-2.10.ebuild | 262 +++++++++++++++++++++++++++++++
 net-wireless/hostapd/hostapd-9999.ebuild |  17 +-
 3 files changed, 270 insertions(+), 10 deletions(-)
Comment 3 LABBE Corentin 2022-01-17 06:20:27 UTC
The bug was sent upstream:
https://www.spinics.net/lists/hostap/msg09276.html
and fixed upstream:
https://www.spinics.net/lists/hostap/msg09275.html

Sorry to have forgot to repost here
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-17 06:23:12 UTC
(In reply to LABBE Corentin from comment #3)
> The bug was sent upstream:
> https://www.spinics.net/lists/hostap/msg09276.html
> and fixed upstream:
> https://www.spinics.net/lists/hostap/msg09275.html
> 
> Sorry to have forgot to repost here

Thank you for the update! Looks like it should be fixed in 2.10 then! :)