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: <20240401224417.3584-1-hdanton@sina.com>
Date: Tue,  2 Apr 2024 06:44:17 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+fbf74291c3b7e753b481@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [net?] possible deadlock in hsr_dev_xmit (2)

On Sun, 31 Mar 2024 23:11:27 -0700
> syzbot has found a reproducer for the following issue on:
> 
> HEAD commit:    480e035fc4c7 Merge tag 'drm-next-2024-03-13' of https://gi..
> git tree:       upstream
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15e0f5c3180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  480e035fc4c7

--- x/net/hsr/hsr_device.c
+++ y/net/hsr/hsr_device.c
@@ -220,15 +220,19 @@ static netdev_tx_t hsr_dev_xmit(struct s
 {
 	struct hsr_priv *hsr = netdev_priv(dev);
 	struct hsr_port *master;
+	static int depth = 0;
 
 	master = hsr_port_get_hsr(hsr, HSR_PT_MASTER);
 	if (master) {
 		skb->dev = master->dev;
 		skb_reset_mac_header(skb);
 		skb_reset_mac_len(skb);
-		spin_lock_bh(&hsr->seqnr_lock);
+		local_bh_disable();
+		spin_lock_nested(&hsr->seqnr_lock, ++depth);
 		hsr_forward_skb(skb, master);
-		spin_unlock_bh(&hsr->seqnr_lock);
+		--depth;
+		spin_unlock(&hsr->seqnr_lock);
+		local_bh_enable();
 	} else {
 		dev_core_stats_tx_dropped_inc(dev);
 		dev_kfree_skb_any(skb);
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ