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: <20240706080102.1cccb499@hermes.local>
Date: Sat, 6 Jul 2024 08:01:02 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Jeongjun Park <aha310510@...il.com>
Cc: jiri@...nulli.us, syzbot+705c61d60b091ef42c04@...kaller.appspotmail.com,
 davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 linux-kernel@...r.kernel.org, netdev@...r.kernel.org, pabeni@...hat.com,
 syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH net,v2] team: Fix ABBA deadlock caused by race in
 team_del_slave

On Sat,  6 Jul 2024 13:13:29 +0900
Jeongjun Park <aha310510@...il.com> wrote:

>        CPU0                    CPU1
>        ----                    ----
>   lock(&rdev->wiphy.mtx);
>                                lock(team->team_lock_key#4);
>                                lock(&rdev->wiphy.mtx);
>   lock(team->team_lock_key#4);
> 
> Deadlock occurs due to the above scenario. Therefore, you can prevent
> deadlock by briefly releasing the lock before calling dev_open() in
> team_port_add() and locking it again after it returns.
> 
> Reported-and-tested-by: syzbot+705c61d60b091ef42c04@...kaller.appspotmail.com
> Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
> Signed-off-by: Jeongjun Park <aha310510@...il.com>
> ---

But if you drop the lock the actual data structures might have changed.
Usually not a good idea,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ