LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-26-2017, 04:58 AM   #1
anon007
LQ Newbie
 
Registered: Jul 2017
Posts: 7

Rep: Reputation: Disabled
Patch proposed for kernel 4.9 of the debian 9.1.0 by Amos Tibaldi


For : Linus Torvalds, www.linuxfoundation.org

tibaldi@localhost:/usr/src/linux-source-4.9$ grep -r "send\ auth\ t" *
Binary file net/mac80211/mlme.o matches
Binary file net/mac80211/mac80211.o matches
net/mac80211/mlme.c: sdata_info(sdata, "send auth to %pM (try %d/%d)\n",
Binary file net/mac80211/mac80211.ko matches
tibaldi@localhost:/usr/src/linux-source-4.9$

Jul 23 16:43:36 localhost NetworkManager[639]: <info> [1500821016.5118] device (wlxc83a35c04107): Activation: starting connection 'WiMORE' (b1b43248-9501-4ebb-a4bc-694296920648)
Jul 23 16:43:36 localhost NetworkManager[639]: <info> [1500821016.5121] audit: op="connection-activate" uuid="b1b43248-9501-4ebb-a4bc-694296920648" name="WiMORE" pid=20224 uid=1000 result="success"
Jul 23 16:43:36 localhost NetworkManager[639]: <info> [1500821016.5125] device (wlxc83a35c04107): state change: disconnected -> prepare (reason 'none') [30 40 0]
Jul 23 16:43:36 localhost NetworkManager[639]: <info> [1500821016.9275] device (wlxc83a35c04107): set-hw-addr: reset MAC address to C8:3A:35:C0:41:07 (preserve)
Jul 23 16:43:37 localhost kernel: [ 8013.517100] IPv6: ADDRCONF(NETDEV_UP): wlxc83a35c04107: link is not ready
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2674] device (wlxc83a35c04107): state change: prepare -> config (reason 'none') [40 50 0]
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2677] device (wlxc83a35c04107): Activation: (wifi) access point 'WiMORE' has security, but secrets are required.
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2677] device (wlxc83a35c04107): state change: config -> need-auth (reason 'none') [50 60 0]
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2929] device (wlxc83a35c04107): state change: need-auth -> prepare (reason 'none') [60 40 0]
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2933] device (wlxc83a35c04107): state change: prepare -> config (reason 'none') [40 50 0]
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2936] device (wlxc83a35c04107): Activation: (wifi) connection 'WiMORE' has security, and secrets exist. No new secrets needed.
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2937] Config: added 'ssid' value 'WiMORE'
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2937] Config: added 'scan_ssid' value '1'
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2938] Config: added 'key_mgmt' value 'WPA-PSK'
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2938] Config: added 'auth_alg' value 'OPEN'
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.2938] Config: added 'psk' value '<hidden>'
Jul 23 16:43:37 localhost wpa_supplicant[745]: wlxc83a35c04107: SME: Trying to authenticate with 14:91:82:69:22:aa (SSID='WiMORE' freq=2412 MHz)
Jul 23 16:43:37 localhost kernel: [ 8013.558674] wlxc83a35c04107: authenticate with 14:91:82:69:22:aa
Jul 23 16:43:37 localhost NetworkManager[639]: <info> [1500821017.3438] device (wlxc83a35c04107): supplicant interface state: inactive -> authenticating
Jul 23 16:43:37 localhost kernel: [ 8013.594741] wlxc83a35c04107: send auth to 14:91:82:69:22:aa (try 1/3)
Jul 23 16:43:37 localhost kernel: [ 8013.801315] wlxc83a35c04107: send auth to 14:91:82:69:22:aa (try 2/3)
Jul 23 16:43:37 localhost kernel: [ 8013.802870] wlxc83a35c04107: authenticated
Jul 23 16:43:42 localhost wpa_supplicant[745]: wlxc83a35c04107: SME: Deauth request to the driver failed
Jul 23 16:43:42 localhost wpa_supplicant[745]: wlxc83a35c04107: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="WiMORE" auth_failures=1 duration=10 reason=CONN_FAILED
Jul 23 16:43:42 localhost NetworkManager[639]: <info> [1500821022.3522] device (wlxc83a35c04107): supplicant interface state: authenticating -> disconnected
Jul 23 16:43:52 localhost NetworkManager[639]: <info> [1500821032.3553] device (wlxc83a35c04107): supplicant interface state: disconnected -> scanning
Jul 23 16:43:53 localhost wpa_supplicant[745]: wlxc83a35c04107: CTRL-EVENT-SSID-REENABLED id=0 ssid="WiMORE"
Jul 23 16:43:53 localhost kernel: [ 8030.117727] wlxc83a35c04107: authenticate with 14:91:82:69:22:aa
Jul 23 16:43:53 localhost wpa_supplicant[745]: wlxc83a35c04107: SME: Trying to authenticate with 14:91:82:69:22:aa (SSID='WiMORE' freq=2412 MHz)
Jul 23 16:43:53 localhost NetworkManager[639]: <info> [1500821033.9327] device (wlxc83a35c04107): supplicant interface state: scanning -> authenticating
Jul 23 16:43:53 localhost kernel: [ 8030.183868] wlxc83a35c04107: send auth to 14:91:82:69:22:aa (try 1/3)
Jul 23 16:43:53 localhost kernel: [ 8030.185392] wlxc83a35c04107: authenticated
Jul 23 16:43:58 localhost wpa_supplicant[745]: wlxc83a35c04107: SME: Deauth request to the driver failed
Jul 23 16:43:58 localhost wpa_supplicant[745]: wlxc83a35c04107: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="WiMORE" auth_failures=2 duration=20 reason=CONN_FAILED
Jul 23 16:43:58 localhost NetworkManager[639]: <info> [1500821038.9425] device (wlxc83a35c04107): supplicant interface state: authenticating -> disconnected



My suggested patch is:

static int ieee80211_auth(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct ieee80211_mgd_auth_data *auth_data = ifmgd->auth_data;
u32 tx_flags = 0;
u16 trans = 1;
u16 status = 0;

sdata_assert_lock(sdata);

if (WARN_ON_ONCE(!auth_data))
return -EINVAL;

auth_data->tries++;

if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) {
sdata_info(sdata, "authentication with %pM timed out\n",
auth_data->bss->bssid);

/*
* Most likely AP is not in the range so remove the
* bss struct for that AP.
*/
cfg80211_unlink_bss(local->hw.wiphy, auth_data->bss);

return -ETIMEDOUT;
}

drv_mgd_prepare_tx(local, sdata);

sdata_info(sdata, "send auth to %pM (try %d/%d)\n",
auth_data->bss->bssid, auth_data->tries,
IEEE80211_AUTH_MAX_TRIES);

auth_data->expected_transaction = 2;

if (auth_data->algorithm == WLAN_AUTH_SAE) {
trans = auth_data->sae_trans;
status = auth_data->sae_status;
auth_data->expected_transaction = trans;
}

if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS))
tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
(IEEE80211_TX_INTFL_MLME_CONN_TX && (!(IEEE80211_TX_CTL_REQ_TX_STATUS)));

ieee80211_send_auth(sdata, trans, auth_data->algorithm, status,
auth_data->data, auth_data->data_len,
auth_data->bss->bssid,
auth_data->bss->bssid, NULL, 0, 0,
tx_flags);

if (tx_flags == 0) {
auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
auth_data->timeout_started = true;
run_again(sdata, auth_data->timeout);
} else {
auth_data->timeout =
round_jiffies_up(jiffies + IEEE80211_AUTH_TIMEOUT_LONG);
auth_data->timeout_started = true;
run_again(sdata, auth_data->timeout);
}

return 0;
}

static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata)
{

And here is the final compilation result:

tibaldi@localhost:~$ cd /usr/src/linux-source-4.9/
tibaldi@localhost:/usr/src/linux-source-4.9$ make -j 9
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/package.h
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC [M] net/mac80211/mlme.o
LD [M] net/mac80211/mac80211.o
Building modules, stage 2.
DATAREL arch/x86/boot/compressed/vmlinux
Kernel: arch/x86/boot/bzImage is ready (#1)
MODPOST 3381 modules
LD [M] net/mac80211/mac80211.ko
tibaldi@localhost:/usr/src/linux-source-4.9$


Many thanks, Professor Linus Torvalds.
 
Old 07-26-2017, 03:10 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
You should post this to the Linux kernel mailing list. Note: Make sure to read the LKML FAQ before posting.

Browsing through some of the recent posts in the list archives might also be a good idea, as it'll give you an idea of the general tone and etiquette of the list.

Your post/mail should start with a short explanation of the issue, and the topic should make it clear that this is a bug report against the mac80211 driver.

Also, your proposed fix should be in the universal diff format, as generated by the diff command. You'll find plenty of examples of this in the archives.

Good luck, and thanks a lot for taking the time and effort to track down and fix a driver bug!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Patch o matic and debian kernel dir ! gabsik Linux - Security 16 05-14-2006 11:53 PM
compiling problem of debian kernel 2.6.15 with 2.6.15-mms patch headlie Linux - Laptop and Netbook 0 01-08-2006 03:30 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 01:21 PM
is there a patch for kernel flaw found in Debian ergo_sum Linux - Newbie 3 12-02-2003 11:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration