Forwarded: BUG:[syzbot] [net?] kernel BUG in pn_socket_autobind

syzbot
2026-04-26T07:50:26Z

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: BUG:[syzbot] [net?] kernel BUG in pn_socket_autobind
Author: suresh.k.chandrappa@gmail.com

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master

diff --git a/net/phonet/socket.c b/net/phonet/socket.c
index c4af26357144..522512094b13 100644
--- a/net/phonet/socket.c
+++ b/net/phonet/socket.c
@@ -210,7 +210,8 @@ static int pn_socket_autobind(struct socket *sock)
sizeof(struct sockaddr_pn));
if (err != -EINVAL)
return err;
- BUG_ON(!pn_port(pn_sk(sock->sk)->sobject));
+ if (!pn_port(pn_sk(sock->sk)->sobject))
+ return -ENOBUFS;
return 0; /* socket was already bound */
}