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: <163898867631.25635.4428090129876791219.kvalo@kernel.org>
Date:   Wed,  8 Dec 2021 18:37:59 +0000 (UTC)
From:   Kalle Valo <kvalo@...nel.org>
To:     Brian Norris <briannorris@...omium.org>
Cc:     Jia-Ju Bai <baijiaju1990@...il.com>, amitkarwar@...il.com,
        ganapathi017@...il.com, sharvari.harisangam@....com,
        huxinming820@...il.com, kvalo@...eaurora.org,
        David Miller <davem@...emloft.net>, kuba@...nel.org,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Doug Anderson <dianders@...omium.org>
Subject: Re: [PATCH] mwifiex: Fix possible ABBA deadlock

Brian Norris <briannorris@...omium.org> wrote:

> Quoting Jia-Ju Bai <baijiaju1990@...il.com>:
> 
>   mwifiex_dequeue_tx_packet()
>      spin_lock_bh(&priv->wmm.ra_list_spinlock); --> Line 1432 (Lock A)
>      mwifiex_send_addba()
>        spin_lock_bh(&priv->sta_list_spinlock); --> Line 608 (Lock B)
> 
>   mwifiex_process_sta_tx_pause()
>      spin_lock_bh(&priv->sta_list_spinlock); --> Line 398 (Lock B)
>      mwifiex_update_ralist_tx_pause()
>        spin_lock_bh(&priv->wmm.ra_list_spinlock); --> Line 941 (Lock A)
> 
> Similar report for mwifiex_process_uap_tx_pause().
> 
> While the locking expectations in this driver are a bit unclear, the
> Fixed commit only intended to protect the sta_ptr, so we can drop the
> lock as soon as we're done with it.
> 
> IIUC, this deadlock cannot actually happen, because command event
> processing (which calls mwifiex_process_sta_tx_pause()) is
> sequentialized with TX packet processing (e.g.,
> mwifiex_dequeue_tx_packet()) via the main loop (mwifiex_main_process()).
> But it's good not to leave this potential issue lurking.
> 
> Fixes: ("f0f7c2275fb9 mwifiex: minor cleanups w/ sta_list_spinlock in cfg80211.c")
> Cc: Douglas Anderson <dianders@...omium.org>
> Reported-by: TOTE Robot <oslab@...nghua.edu.cn>
> Link: https://lore.kernel.org/linux-wireless/0e495b14-efbb-e0da-37bd-af6bd677ee2c@gmail.com/
> Signed-off-by: Brian Norris <briannorris@...omium.org>
> Reviewed-by: Douglas Anderson <dianders@...omium.org>

Fixes tag is in wrong format, should be:

Fixes: f0f7c2275fb9 ("mwifiex: minor cleanups w/ sta_list_spinlock in cfg80211.c")

I'll fix it during commit.

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/YaV0pllJ5p/EuUat@google.com/

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ