Re: [syzbot] [rdma?] [s390?] [net?] KASAN: null-ptr-deref Read in smc_tcp_syn_recv_sock
From: Hillf Danton
Date: Sun Jun 29 2025 - 20:27:46 EST
> Date: Mon, 31 Mar 2025 13:23:20 -0700
> syzbot found the following issue on:
>
> HEAD commit: 850925a8133c Merge tag '9p-for-6.12-rc5' of https://github..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1227aa87980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=17c0d505695d6b0
> dashboard link: https://syzkaller.appspot.com/bug?extid=827ae2bfb3a3529333e9
> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15489230580000
#syz test upstream master
--- x/net/smc/af_smc.c
+++ y/net/smc/af_smc.c
@@ -127,6 +127,8 @@ static struct sock *smc_tcp_syn_recv_soc
struct sock *child;
smc = smc_clcsock_user_data(sk);
+ if (!smc)
+ goto drop;
if (READ_ONCE(sk->sk_ack_backlog) + atomic_read(&smc->queued_smc_hs) >
sk->sk_max_ack_backlog)
--