You are not logged in.

#1 2016-04-25 15:00:33

nartes
Member
From: Minsk, Belarus
Registered: 2014-07-05
Posts: 62
Website

wpa_supplicant, eduroam nl80211: set_key failed; err=-22 Inval

Original thread https://bbs.archlinux.org/viewtopic.php?id=211619

UPD

Latest message to the thread on hostap mailing-list
Date: Tue, 3 May 2016 11:36:06 +0300
Delivered-To: serega.belarus@gmail.com
Message-ID: <CAGdowOP-m4ASFBSf-fh=BFDFEQaNjF-CFWjnhM6iEEKcqELWRQ@mail.gmail.com>
Subject: Re: eduroam disconnects with reason=3 (WPA-EAP, PEAP, MSCHAPv2)
From: Sergei Sinyak <serega.belarus@gmail.com>
To: Dan Williams <dcbw@redhat.com>, Jouni Malinen <j@w1.fi>, hostap@lists.infradead.org
Content-Type: text/plain; charset=UTF-8

Hello.

I tried to configure wpa_supplicant with those keys
"tls_disable_tlsv1_1=1 tls_disable_tlsv1_2=1".

wpa_supplicant sucefully achieves "Authorized state"
https://gist.github.com/anonymous/72f8d … t-log-L857

But it can't complete "4WAY-HANDSHAKE", because of "WPA: Failed to set
GTK to the driver".
https://gist.github.com/anonymous/72f8d … t-log-L870

Here is log from wpa_supplicant
https://gist.github.com/anonymous/72f8d … bc7c181747

Here is wpa_supplicant config
https://gist.github.com/anonymous/576c9 … 4e13034bf3

Please explain a possible reason for such a behaviour.

Sergei Sinyak

UPD#2:

IRC at freenode/ ##hostapd
<nartes> wpa_driver_nl80211_set_key provides invalid argument
<nartes> here is https://gist.github.com/anonymous/72f8d … t-log-L869
<nartes> It is some kind of api regression?
<nartes> This behaviour comes when using deprecated tls encryption
<nartes> https://gist.github.com/anonymous/72f8d … nt-log-L16
<nartes> Deprecated after this commit at 2015 summer
<nartes> https://w1.fi/cgit/hostap/commit/?id=35 … ce79a99beb

Looks like set_key function

% grep -e 'nl80211.*set_key' * -Rn
net/wireless/nl80211.c:2943:static int nl80211_set_key(struct sk_buff *skb, struct genl_info *info)

is called with incorrect argument.

Might be function wpa_driver_nl80211_set_key

% grep wpa_driver_nl80211_set_key * -Rn
src/drivers/driver_nl80211.c:2596:static int wpa_driver_nl80211_set_key(const char *ifname, struct i802_bss *bss,

hides some buggy hehaviour.
Quite possible due to depracation of old encryption functionality
in commit [35efa2479ff19c3f13e69dc50d2708ce79a99beb].

UPD #3:
Hope this time they won't ban my e-mail:

Subject: Re: eduroam disconnects with reason=3 (WPA-EAP, PEAP, MSCHAPv2)
From: Sergei Sinyak <serega.belarus@gmail.com>
To: Dan Williams <dcbw@redhat.com>, Jouni Malinen <j@w1.fi>, hostap@lists.infradead.org
Content-Type: text/plain; charset=UTF-8

Hello, developers.

I confirm that this options solve issue in general. Connection establishes
via wpa_supplicant and dhcpcd retrieves ip configuration.

here is config:

% cat eduroam.conf
ctrl_interface=/run/wpa_supplicant
network={
  ssid="eduroam"
  key_mgmt=WPA-EAP
  eap=PEAP
  identity="fpm.SinyakSA"
  password="USER_PASSWORD_OMITTED"
  phase1="tls_disable_tlsv1_1=1 tls_disable_tlsv1_2=1"
  phase2="auth=MSCHAPV2"
}
% wpa_supplicant -i wlp1s0b1 -c eduroam.conf
% dhcpcd wlp1s0b1

It works well! Thanks for your time.

best regards,
Sergei Sinyak

P.S.
It works for a few laptops of my friends.
But on my machine it results in a error on a further stage.
Particularly, here it is:
nl80211: set_key failed; err=-22 Invalid argument)

More info can be found on archforum thread
https://bbs.archlinux.org/viewtopic.php?id=211619

Last edited by nartes (2016-05-20 15:11:58)

Offline

Board footer

Powered by FluxBB