From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+0ee4da32f91ae2a3f015@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [hams?] WARNING: refcount bug in ax25_setsockopt
Date: Sat, 12 Jul 2025 08:57:50 +0800 [thread overview]
Message-ID: <20250712005751.3574-1-hdanton@sina.com> (raw)
In-Reply-To: <68712da2.a00a0220.26a83e.0052.GAE@google.com>
> 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;
--
next prev parent reply other threads:[~2025-07-12 0:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 15:28 [syzbot] [hams?] WARNING: refcount bug in ax25_setsockopt syzbot
2025-07-12 0:57 ` Hillf Danton [this message]
2025-07-12 1:44 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250712005751.3574-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+0ee4da32f91ae2a3f015@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.