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] [day] [month] [year] [list]
Message-ID: <165892638117.11639.15108682372355290807.kvalo@kernel.org>
Date:   Wed, 27 Jul 2022 12:53:02 +0000 (UTC)
From:   Kalle Valo <kvalo@...nel.org>
To:     Zheyu Ma <zheyuma97@...il.com>
Cc:     Jes.Sorensen@...il.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com, linux-wireless@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Zheyu Ma <zheyuma97@...il.com>
Subject: Re: wifi: rtl8xxxu: Fix the error handling of the probe function

Zheyu Ma <zheyuma97@...il.com> wrote:

> When the driver fails at ieee80211_alloc_hw() at the probe time, the
> driver will free the 'hw' which is not allocated, causing a bug.
> 
> The following log can reveal it:
> 
> [   15.981294] BUG: KASAN: user-memory-access in mutex_is_locked+0xe/0x40
> [   15.981558] Read of size 8 at addr 0000000000001ab0 by task modprobe/373
> [   15.982583] Call Trace:
> [   15.984282]  ieee80211_free_hw+0x22/0x390
> [   15.984446]  rtl8xxxu_probe+0x3a1/0xab30 [rtl8xxxu]
> 
> Fix the bug by changing the order of the error handling.
> 
> Signed-off-by: Zheyu Ma <zheyuma97@...il.com>

Patch applied to wireless-next.git, thanks.

13876f2a087a wifi: rtl8xxxu: Fix the error handling of the probe function

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220716130444.2950690-1-zheyuma97@gmail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ