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: <20250712005751.3574-1-hdanton@sina.com>
Date: Sat, 12 Jul 2025 08:57:50 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+0ee4da32f91ae2a3f015@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [hams?] WARNING: refcount bug in ax25_setsockopt

> Date: Fri, 11 Jul 2025 08:28:34 -0700	[thread overview]
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    faeefc173be4 sock: Correct error checking condition for (a..
> git tree:       net-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=157b9c04580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=eecd7902e39d7933
> dashboard link: https://syzkaller.appspot.com/bug?extid=0ee4da32f91ae2a3f015
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15875398580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=137b9c04580000

#syz test

--- x/net/ax25/af_ax25.c
+++ y/net/ax25/af_ax25.c
@@ -694,8 +694,10 @@ static int ax25_setsockopt(struct socket
 			ax25_dev_put(ax25->ax25_dev);
 		}
 
+		spin_lock_bh(&ax25_dev_lock);
 		ax25->ax25_dev = ax25_dev_ax25dev(dev);
 		if (!ax25->ax25_dev) {
+			spin_unlock_bh(&ax25_dev_lock);
 			rcu_read_unlock();
 			res = -ENODEV;
 			break;
@@ -703,6 +705,7 @@ static int ax25_setsockopt(struct socket
 		ax25_fillin_cb(ax25, ax25->ax25_dev);
 		netdev_hold(dev, &ax25->dev_tracker, GFP_ATOMIC);
 		ax25_dev_hold(ax25->ax25_dev);
+		spin_unlock_bh(&ax25_dev_lock);
 		rcu_read_unlock();
 		break;
 
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ