From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Paolo Abeni <pabeni@redhat.com>,
Wang Liang <wangliang74@huawei.com>,
wenjia@linux.ibm.com, jaka@linux.ibm.com,
alibuda@linux.alibaba.com, tonylu@linux.alibaba.com,
guwen@linux.alibaba.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, horms@kernel.org,
ubraun@linux.vnet.ibm.com
Cc: yuehaibing@huawei.com, zhangchangzhong@huawei.com,
linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net/smc: fix general protection fault in __smc_diag_dump
Date: Tue, 1 Apr 2025 15:31:57 +0200 [thread overview]
Message-ID: <052a9a59-b555-4867-9ec6-c6fa719adb61@linux.dev> (raw)
In-Reply-To: <37f86471-5abc-4f04-954e-c6fb5f2b653a@redhat.com>
On 01.04.25 13:01, Paolo Abeni wrote:
> On 3/31/25 10:10 AM, Wang Liang wrote:
>> diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
>> index 3e6cb35baf25..454801188514 100644
>> --- a/net/smc/af_smc.c
>> +++ b/net/smc/af_smc.c
>> @@ -371,6 +371,7 @@ void smc_sk_init(struct net *net, struct sock *sk, int protocol)
>> sk->sk_protocol = protocol;
>> WRITE_ONCE(sk->sk_sndbuf, 2 * READ_ONCE(net->smc.sysctl_wmem));
>> WRITE_ONCE(sk->sk_rcvbuf, 2 * READ_ONCE(net->smc.sysctl_rmem));
>> + smc->clcsock = NULL;
>> INIT_WORK(&smc->tcp_listen_work, smc_tcp_listen_work);
>> INIT_WORK(&smc->connect_work, smc_connect_work);
>> INIT_DELAYED_WORK(&smc->conn.tx_work, smc_tx_work);
>
> The syzkaller report has a few reproducers, have you tested this? AFAICS
> the smc socket is already zeroed on allocation by sk_alloc().
Yes. I also agree with you that smc socket should have already been zeroed.
Currently in this commit, this member variable is set to NULL
explicitly. I am not sure if this can fix this problem or not.
Based on the following, it seems that this problem can be reproduced.
"
syzbot has tested the proposed patch but the reproducer is still
triggering an issue:
general protection fault in __smc_diag_dump
"
Thus follow the instructions in this link to make tests.
https://groups.google.com/g/syzkaller-bugs/c/YwENRImdcsk/m/wBJo6qGiCAAJ?pli=1,
the following can trigger the reproducer.
"
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
"
Zhu Yanjun
>
> /P
>
next prev parent reply other threads:[~2025-04-01 13:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 8:10 [PATCH net] net/smc: fix general protection fault in __smc_diag_dump Wang Liang
2025-04-01 11:01 ` Paolo Abeni
2025-04-01 13:31 ` Zhu Yanjun [this message]
2025-04-02 2:37 ` Wang Liang
2025-04-02 7:20 ` D. Wythe
2025-04-03 7:09 ` Wang Liang
2025-04-03 11:55 ` Wenjia Zhang
2025-04-10 3:11 ` Wang Liang
-- strict thread matches above, loose matches on Subject: below --
2025-09-22 12:18 Wang Liang
2025-09-25 14:32 ` Eric Dumazet
2025-09-25 18:46 ` Kuniyuki Iwashima
2025-09-25 18:53 ` Eric Dumazet
2025-09-25 19:25 ` Kuniyuki Iwashima
2025-09-25 19:37 ` Eric Dumazet
2025-09-25 19:51 ` Kuniyuki Iwashima
2025-09-26 8:42 ` Wang Liang
2025-10-14 2:04 ` D. Wythe
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=052a9a59-b555-4867-9ec6-c6fa719adb61@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=horms@kernel.org \
--cc=jaka@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tonylu@linux.alibaba.com \
--cc=ubraun@linux.vnet.ibm.com \
--cc=wangliang74@huawei.com \
--cc=wenjia@linux.ibm.com \
--cc=yuehaibing@huawei.com \
--cc=zhangchangzhong@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox