Bug 1582839

Summary: netlink: 'hostapd': attribute type 213 has an invalid length
Product: [Fedora] Fedora Reporter: Harald Reindl <h.reindl>
Component: hostapdAssignee: Davide Caratti <dcaratti>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: airlied, bskeggs, dcaratti, ewk, hdegoede, h.reindl, ichavero, itamar, jarodwilson, jglisse, john.j5live, jonathan, josef, kernel-maint, linville, mchehab, mjg59, negativo17, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hostapd-2.6-9.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-12 16:03:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Reindl 2018-05-27 10:03:54 UTC
in recent kernels (4.16.x) when you run 'hostapd' als wireless acccesspoint dmesg comes with that message again and again - that should really get silenced as bafore

[So Mai 27 04:51:02 2018] netlink: 'hostapd': attribute type 213 has an invalid length.
[So Mai 27 04:51:02 2018] netlink: 'hostapd': attribute type 213 has an invalid length.
[So Mai 27 05:45:33 2018] netlink: 'hostapd': attribute type 213 has an invalid length.
[So Mai 27 09:43:28 2018] netlink: 'hostapd': attribute type 213 has an invalid length.
[So Mai 27 09:43:28 2018] netlink: 'hostapd': attribute type 213 has an invalid length.
[So Mai 27 11:07:09 2018] netlink: 'hostapd': attribute type 213 has an invalid length.

Comment 1 Davide Caratti 2018-05-29 10:02:57 UTC
(In reply to Harald Reindl from comment #0)
> in recent kernels (4.16.x) when you run 'hostapd' als wireless acccesspoint
> dmesg comes with that message again and again - that should really get
> silenced as bafore
> 

> [So Mai 27 04:51:02 2018] netlink: 'hostapd': attribute type 213 has an
> invalid length.
> [So Mai 27 04:51:02 2018] netlink: 'hostapd': attribute type 213 has an
> invalid length.
> [So Mai 27 05:45:33 2018] netlink: 'hostapd': attribute type 213 has an
> invalid length.
> [So Mai 27 09:43:28 2018] netlink: 'hostapd': attribute type 213 has an
> invalid length.
> [So Mai 27 09:43:28 2018] netlink: 'hostapd': attribute type 213 has an
> invalid length.
> [So Mai 27 11:07:09 2018] netlink: 'hostapd': attribute type 213 has an
> invalid length.

it should be sufficient to backport

commit a2426829c
Author: Jouni Malinen <jouni.com>
Date:   Fri Dec 1 20:22:44 2017 +0200

    nl80211: Fix NL80211_ATTR_SMPS_MODE encoding

at least, it was sufficent to mute the message on wpa_supplicant working in AP mode. Can you try the following rpms ? 

https://copr.fedorainfracloud.org/coprs/dcaratti/hostapd/build/759850/

thanks!
--
davide

Comment 2 Harald Reindl 2018-05-29 10:06:13 UTC
no, because i build hostapd for many years now at my own

can you point me to the patch directly so that i can include it in my rpm-build, in case if it fixes the problem that it's very likley it does also for the fedora package

[builduser@testserver:/rpmbuild/SPECS]$ cat /rpmbuild/SPECS/hostapd.spec 
Name:              hostapd
Version:           2.6
Release:           19%{?dist}
Summary:           IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
License:           BSD
URL:               https://w1.fi/releases/
Source0:           %{name}-%{version}.tar.gz
Source1:           %{name}.service
Source2:           %{name}.sysconfig
Source3:           %{name}.defconfig
Patch1:            rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
Patch2:            rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
Patch3:            rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
Patch4:            rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch
Patch5:            rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
Patch6:            rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch
Patch7:            rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
BuildRequires:     libnl3-devel
BuildRequires:     openssl-devel

%description
hostapd is a user space daemon for access point and authentication
servers. It implements IEEE 802.11 access point management, IEEE
802.1X/WPA/WPA2/EAP Authenticators and RADIUS authentication server

%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1

%build
cd %{name}
export CFLAGS="%{optflags} %{OS_flags} -fPIC -fuse-ld=gold -fuse-linker-plugin"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export CC="gcc $CFLAGS"
export SH_LDFLAGS="-Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack %{optflags} %{OS_flags} -fuse-ld=gold -fuse-linker-plugin"
export LDFLAGS="$SH_LDFLAGS -pie -fPIE"
cat %{SOURCE3} > .config
%{__make} %{?_smp_mflags} EXTRA_CFLAGS="%{optflags} %{OS_flags}"

%install
install -d %{buildroot}%{_unitdir}
install -pm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -d %{buildroot}%{_sysconfdir}/%{name}
install -d %{buildroot}%{_sysconfdir}/sysconfig
install -pm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
install -d %{buildroot}%{_sbindir}
install -pm 0755 %{name}/%{name} %{buildroot}%{_sbindir}/%{name}
install -pm 0755 %{name}/%{name}_cli %{buildroot}%{_sbindir}/%{name}_cli
install -d %{buildroot}%{_mandir}/man{1,8}
install -pm 0644 %{name}/%{name}_cli.1 %{buildroot}%{_mandir}/man1
install -pm 0644 %{name}/%{name}.8 %{buildroot}%{_mandir}/man8
strip -s %{buildroot}%{_sbindir}/%{name} %{buildroot}%{_sbindir}/%{name}_cli

%files
%doc %{name}/%{name}.conf %{name}/wired.conf
%doc %{name}/%{name}.accept %{name}/%{name}.deny
%doc %{name}/%{name}.eap_user %{name}/%{name}.radius_clients
%doc %{name}/%{name}.vlan %{name}/%{name}.wpa_psk
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_unitdir}/%{name}.service
%{_sbindir}/%{name}
%{_sbindir}/%{name}_cli
%dir %{_sysconfdir}/%{name}
%{_mandir}/man1/*
%{_mandir}/man8/*

%post
%systemd_post

%changelog
* Tue Oct 17 2017 Reindl Harald <h.reindl>
- added security patches from https://w1.fi/security/2017-1/

Comment 3 Harald Reindl 2018-05-29 10:25:01 UTC
ok, found the src.rpm on copr, rebuild done, i can confirm this at evening because the machine is at home and it seems to be triggered when the smartphone connects

* Tue May 29 2018 Reindl Harald <h.reindl>
- added 'hostapd-nl80211-Fix-NL80211_ATTR_SMPS_MODE-encoding.patch' for https://bugzilla.redhat.com/show_bug.cgi?id=1582839

Comment 4 Harald Reindl 2018-05-29 17:59:25 UTC
"nl80211-Fix-NL80211_ATTR_SMPS_MODE-encoding.patch" indeed is fixing the warnings

Comment 6 Fedora Update System 2018-06-01 17:35:06 UTC
hostapd-2.6-9.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-52f92c6620

Comment 7 Fedora Update System 2018-06-01 18:13:45 UTC
hostapd-2.6-9.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5c9f54423f

Comment 8 Fedora Update System 2018-06-02 20:28:18 UTC
hostapd-2.6-9.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5c9f54423f

Comment 9 Fedora Update System 2018-06-02 22:33:42 UTC
hostapd-2.6-9.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-52f92c6620

Comment 10 Fedora Update System 2018-06-12 15:19:54 UTC
hostapd-2.6-9.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-06-12 16:03:59 UTC
hostapd-2.6-9.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.