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-next>] [day] [month] [year] [list]
Date:   Tue, 23 Nov 2021 11:31:34 +0800
From:   Jia-Ju Bai <baijiaju1990@...il.com>
To:     amitkarwar@...il.com, ganapathi017@...il.com,
        sharvari.harisangam@....com, huxinming820@...il.com,
        kvalo@...eaurora.org, David Miller <davem@...emloft.net>,
        kuba@...nel.org
Cc:     linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: [BUG] marvell: mwifiex: two possible ABBA deadlocks

Hello,

My static analysis tool reports two possible ABBA deadlocks in the 
mwifiex driver in Linux 5.10:

# DEADLOCK 1:
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)

When mwifiex_dequeue_tx_packet() and mwifiex_process_sta_tx_pause() are 
concurrently executed, the deadlock can occur.

# DEADLOCK 2:
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_uap_tx_pause()
   spin_lock_bh(&priv->sta_list_spinlock); --> Line 363 (Lock B)
   mwifiex_update_ralist_tx_pause()
     spin_lock_bh(&priv->wmm.ra_list_spinlock); --> Line 941 (Lock A)

When mwifiex_dequeue_tx_packet() and mwifiex_process_uap_tx_pause() are 
concurrently executed, the deadlock can occur.

I am not quite sure whether these possible deadlocks are real and how to 
fix them if they are real.
Any feedback would be appreciated, thanks :)

Reported-by: TOTE Robot <oslab@...nghua.edu.cn>


Best wishes,
Jia-Ju Bai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ