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: <20240320103224.2123-1-hdanton@sina.com>
Date: Wed, 20 Mar 2024 18:32:24 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+9d95beb2a3c260622518@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bpf?] possible deadlock in trie_delete_elem

On Wed, 20 Mar 2024 01:42:21 -0700
> syzbot found the following issue on:
> 
> HEAD commit:    32fa4366cc4d net: phy: fix phy_read_poll_timeout argument ..
> git tree:       net
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1676fc6e180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git  32fa4366cc4d

--- x/kernel/bpf/lpm_trie.c
+++ y/kernel/bpf/lpm_trie.c
@@ -321,7 +321,7 @@ static long trie_update_elem(struct bpf_
 	if (key->prefixlen > trie->max_prefixlen)
 		return -EINVAL;
 
-	spin_lock_irqsave(&trie->lock, irq_flags);
+	spin_lock_irqsave_nested(&trie->lock, irq_flags, 1);
 
 	/* Allocate and fill a new node */
 
@@ -448,7 +448,7 @@ static long trie_delete_elem(struct bpf_
 	if (key->prefixlen > trie->max_prefixlen)
 		return -EINVAL;
 
-	spin_lock_irqsave(&trie->lock, irq_flags);
+	spin_lock_irqsave_nested(&trie->lock, irq_flags, 2);
 
 	/* Walk the tree looking for an exact key/length match and keeping
 	 * track of the path we traverse.  We will need to know the node
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ