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: <20240620190114.49677-1-kuniyu@amazon.com>
Date: Thu, 20 Jun 2024 12:01:14 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <edumazet@...gle.com>
CC: <davem@...emloft.net>, <eric.dumazet@...il.com>, <kuba@...nel.org>,
	<kuniyu@...zon.com>, <netdev@...r.kernel.org>, <pabeni@...hat.com>,
	<syzkaller@...glegroups.com>
Subject: Re: [PATCH net] net: add softirq safety to netdev_rename_lock

Date: Thu, 20 Jun 2024 13:31:19 +0000
From: Eric Dumazet <edumazet@...gle.com>
> syzbot reported a lockdep violation involving bridge driver [1]
> 
> Make sure netdev_rename_lock is softirq safe to fix this issue.
> 
> [1]
> WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
> 6.10.0-rc2-syzkaller-00249-gbe27b8965297 #0 Not tainted
>    -----------------------------------------------------
> syz-executor.2/9449 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
>  ffffffff8f5de668 (netdev_rename_lock.seqcount){+.+.}-{0:0}, at: rtnl_fill_ifinfo+0x38e/0x2270 net/core/rtnetlink.c:1839
> 
> and this task is already holding:
>  ffff888060c64cb8 (&br->lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
>  ffff888060c64cb8 (&br->lock){+.-.}-{2:2}, at: br_port_slave_changelink+0x3d/0x150 net/bridge/br_netlink.c:1212
> which would create a new lock dependency:
>  (&br->lock){+.-.}-{2:2} -> (netdev_rename_lock.seqcount){+.+.}-{0:0}
> 
> but this new dependency connects a SOFTIRQ-irq-safe lock:
>  (&br->lock){+.-.}-{2:2}
[...]
> Fixes: 0840556e5a3a ("net: Protect dev->name by seqlock.")
> Reported-by: syzbot <syzkaller@...glegroups.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Kuniyuki Iwashima <kuniyu@...zon.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@...zon.com>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ