lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53e5cb36.2d9d.187c61b8405.Coremail.luyun_611@163.com>
Date:   Fri, 28 Apr 2023 12:25:04 +0800 (CST)
From:   wo <luyun_611@....com>
To:     "Larry Finger" <Larry.Finger@...inger.net>
Cc:     Jes.Sorensen@...il.com, kvalo@...nel.org, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: Re:Re: [PATCH] wifi: rtl8xxxu: fix authentication timeout due to
 incorrect RCR value

At 2023-04-28 10:00:28, "Larry Finger" <Larry.Finger@...inger.net> wrote:
>On 4/26/23 21:05, Yun Lu wrote:
>> From: Yun Lu <luyun@...inos.cn>
>> 
>> When using rtl8192cu with rtl8xxxu driver to connect wifi, there is a
>> probability of failure, which shows "authentication with ... timed out".
>> Through debugging, it was found that the RCR register has been inexplicably
>> modified to an incorrect value, resulting in the nic not being able to
>> receive authenticated frames.
>> 
>> To fix this problem, add regrcr in rtl8xxxu_priv struct, and store
>> the RCR value every time the register is writen, and use it the next
>> time the register need to be modified.
>
>I added the attached patch to see what was different between the two values in 
>REG_RCR. To my surprise, nothing was logged.
>
>Please add this one on top of you proposed patch, and send me the output from 
>the log.
>
>Thanks,
>
>Larry
>
Larry:

Thanks  for providing the debugging patch.
The REG_RCR can only be writen in function rtl8xxxu_init_device or rtl8xxxu_configure_filter,
the init value is 0x7000600e, and may be modified to 0x700060ce or 0x7000604e when 
configure_filter. But on this device(EDIMAX EW-7822UAn) we used, the REG_RCR has indeed
been modified for unknown reason.

After applying your debugging patch, the log shows:
[   70.426757] [pid:217,cpu6,kworker/u16:3,3]AFTER: REG_RCR differs from regrcr: 0x7000600e insted of 0x7000600e
[   70.465881] [pid:1994,cpu6,wpa_supplicant,5]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[   71.803222] [pid:217,cpu7,kworker/u16:3,0]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[   71.805358] [pid:217,cpu7,kworker/u16:3,1]BEFORE: REG_RCR differs from regrcr: 0x70006009 insted of 0x700060ce
[   71.806854] [pid:217,cpu6,kworker/u16:3,2]AFTER: REG_RCR differs from regrcr: 0x390272a insted of 0x700060ce
[   98.894104] [pid:1994,cpu6,wpa_supplicant,9]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  100.151824] [pid:1949,cpu7,NetworkManager,1]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  100.830505] [pid:1994,cpu6,wpa_supplicant,5]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  102.101806] [pid:7,cpu7,kworker/u16:0,9]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  107.545440] [pid:1994,cpu7,wpa_supplicant,4]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  108.878204] [pid:216,cpu1,kworker/u16:2,7]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  126.028961] [pid:1994,cpu7,wpa_supplicant,5]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  127.389801] [2023:04:28 11:11:45][pid:237,cpu7,kworker/u16:5,6]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  137.119384] [pid:1994,cpu6,wpa_supplicant,3]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  138.393005] [pid:237,cpu7,kworker/u16:5,5]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  138.395996] [pid:1994,cpu7,wpa_supplicant,6]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  138.436889] [pid:1994,cpu6,wpa_supplicant,9]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  148.251800] [pid:1994,cpu6,wpa_supplicant,5]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  149.538909] [2023:04:28 11:12:08][pid:216,cpu6,kworker/u16:2,6]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  149.542419] [pid:1994,cpu6,wpa_supplicant,7]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  149.595642] [pid:7,cpu6,kworker/u16:0,0]BEFORE: REG_RCR differs from regrcr: 0x1830613 insted of 0x7000604e
[  149.597778] [pid:1994,cpu6,wpa_supplicant,1]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  159.384613] [pid:1994,cpu7,wpa_supplicant,7]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  160.673583] [pid:237,cpu4,kworker/u16:5,1]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  160.676422] [pid:237,cpu6,kworker/u16:5,3]BEFORE: REG_RCR differs from regrcr: 0x70006009 insted of 0x700060ce
[  170.521148] [pid:1994,cpu7,wpa_supplicant,8]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  171.845764] [pid:237,cpu6,kworker/u16:5,0]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  171.850830] [pid:1994,cpu6,wpa_supplicant,1]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  171.897125] [pid:1994,cpu7,wpa_supplicant,4]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  173.092742] [2023:04:28 11:12:31][pid:1994,cpu6,wpa_supplicant,0]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  174.369445] [pid:237,cpu6,kworker/u16:5,2]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  176.070007] [2023:04:28 11:12:34][pid:1994,cpu7,wpa_supplicant,8]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  177.354827] [2023:04:28 11:12:35][pid:216,cpu6,kworker/u16:2,9]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  181.610473] [pid:1994,cpu7,wpa_supplicant,4]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  182.904541] [pid:7,cpu7,kworker/u16:0,6]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  188.618011] [2023:04:28 11:12:47][pid:1994,cpu7,wpa_supplicant,3]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  189.923339] [2023:04:28 11:12:48][pid:7,cpu7,kworker/u16:0,4]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  192.706268] [pid:1994,cpu6,wpa_supplicant,8]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  194.026855] [pid:7,cpu6,kworker/u16:0,1]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  196.727020] [pid:1994,cpu6,wpa_supplicant,8]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  196.753326] [pid:216,cpu7,kworker/u16:2,9]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  203.798675] [pid:1994,cpu7,wpa_supplicant,4]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  205.088653] [2023:04:28 11:13:03][pid:216,cpu6,kworker/u16:2,5]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  214.879211] [pid:1994,cpu7,wpa_supplicant,7]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  216.193817] [2023:04:28 11:13:14][pid:216,cpu7,kworker/u16:2,8]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  221.726043] [pid:1994,cpu6,wpa_supplicant,2]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  223.019012] [pid:95,cpu6,kworker/u16:1,4]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  225.984741] [pid:1994,cpu7,wpa_supplicant,2]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  227.272735] [pid:95,cpu6,kworker/u16:1,4]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  233.242523] [2023:04:28 11:13:31][pid:1994,cpu7,wpa_supplicant,6]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  234.541503] [pid:237,cpu7,kworker/u16:5,9]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  237.070556] [pid:1994,cpu6,wpa_supplicant,7]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  238.388366] [2023:04:28 11:13:36][pid:237,cpu4,kworker/u16:5,8]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  246.725952] [pid:1994,cpu7,wpa_supplicant,3]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  247.046478] [pid:216,cpu6,kworker/u16:2,4]BEFORE: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  247.079742] [pid:76395,cpu6,ifconfig,5]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  248.217987] [pid:1994,cpu6,wpa_supplicant,9]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  249.530578] [2023:04:28 11:13:48][pid:237,cpu6,kworker/u16:5,1]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  249.533721] [pid:1994,cpu7,wpa_supplicant,2]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  249.579711] [pid:237,cpu6,kworker/u16:5,5]BEFORE: REG_RCR differs from regrcr: 0x1832e13 insted of 0x7000604e
[  249.582946] [pid:1994,cpu7,wpa_supplicant,6]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  259.287170] [pid:1994,cpu7,wpa_supplicant,7]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  260.566009] [pid:237,cpu6,kworker/u16:5,9]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  270.383453] [pid:1994,cpu6,wpa_supplicant,0]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  271.678924] [2023:04:28 11:14:10][pid:7,cpu6,kworker/u16:0,1]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  281.472015] [pid:1994,cpu6,wpa_supplicant,3]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  282.743103] [pid:237,cpu7,kworker/u16:5,5]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  283.654632] [2023:04:28 11:14:22][pid:1994,cpu7,wpa_supplicant,6]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  284.942474] [pid:217,cpu6,kworker/u16:3,8]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  292.564056] [pid:1994,cpu6,wpa_supplicant,8]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  293.845397] [2023:04:28 11:14:32][pid:217,cpu7,kworker/u16:3,9]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  299.727813] [pid:1994,cpu6,wpa_supplicant,3]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  301.002807] [pid:217,cpu7,kworker/u16:3,6]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  303.659973] [pid:1994,cpu6,wpa_supplicant,3]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  304.962829] [2023:04:28 11:14:43][pid:237,cpu7,kworker/u16:5,5]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  305.818237] [pid:1994,cpu7,wpa_supplicant,6]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  307.107818] [pid:216,cpu7,kworker/u16:2,8]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  314.760284] [pid:1994,cpu6,wpa_supplicant,8]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  316.032379] [2023:04:28 11:14:54][pid:95,cpu7,kworker/u16:1,9]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  324.724700] [pid:1994,cpu6,wpa_supplicant,4]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  324.757446] [pid:77352,cpu7,ifconfig,5]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  325.891845] [pid:1994,cpu7,wpa_supplicant,0]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  327.196166] [2023:04:28 11:15:05][pid:7,cpu7,kworker/u16:0,1]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e
[  327.199157] [pid:1994,cpu7,wpa_supplicant,2]AFTER: REG_RCR differs from regrcr: 0x700060ce insted of 0x700060ce
[  327.234588] [pid:7,cpu7,kworker/u16:0,5]BEFORE: REG_RCR differs from regrcr: 0x1830d33 insted of 0x7000604e
[  327.236968] [pid:1994,cpu7,wpa_supplicant,6]AFTER: REG_RCR differs from regrcr: 0x7000604e insted of 0x7000604e

The REG_RCR has been inexplicably modified to an different value, it is very strange on driver's perspective.

In fact, there is another driver rtl8192cu.ko (drivers/net/wireless/realtek/rtlwifi/), that can also match this device.
This driver also uses the saved value instead of reading from REG_RCR, when need to modify the REG_RCR.
And there will be no issue with authentication timeout, if using this rtl8192cu driver.

Thanks.

Yun Lu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ