From: Bryam Vargas <hexlabsecurity@proton.me>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Sidraya Jayagond <sidraya@linux.ibm.com>,
Jakub Kicinski <kuba@kernel.org>,
"D . Wythe" <alibuda@linux.alibaba.com>,
"David S . Miller" <davem@davemloft.net>,
Wen Gu <guwen@linux.alibaba.com>,
Wenjia Zhang <wenjia@linux.ibm.com>,
Eric Dumazet <edumazet@google.com>,
Tony Lu <tonylu@linux.alibaba.com>,
Mahanta Jambigi <mjambigi@linux.ibm.com>,
Dust Li <dust.li@linux.alibaba.com>,
Ursula Braun <ubraun@linux.ibm.com>,
Stefan Raspl <raspl@linux.ibm.com>,
Simon Horman <horms@kernel.org>,
linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v5 1/3] net/smc: bound the wire-controlled producer cursor to the RMB
Date: Tue, 28 Jul 2026 17:25:59 +0000 [thread overview]
Message-ID: <20260728172552.69349-1-hexlabsecurity@proton.me> (raw)
In-Reply-To: <4b5f67a2-5624-4adb-812a-bd87d99416ed@redhat.com>
On Tue, 28 Jul 2026 15:50:02 +0200, Paolo Abeni wrote:
> Sashiko gemini suspects the above may cause a Null ptr dereference:
>
> https://sashiko.dev/#/patchset/20260723-b4-disp-0d07164f-v5-0-6a9e235dbc4e%40proton.me
The window is real, but this patch doesn't open it: the same load is already
on that path.
smc_cdc_msg_recv_action() dereferences conn->rmb_desc->len unconditionally
at smc_cdc.c:376, and nothing between the conversion call at :339 and that
line can return early, so every CDC that reaches the conversion reaches the
existing dereference as well. The patch moves the load about 37 lines up
inside the same function; it doesn't add an execution that touches
conn->rmb_desc. On SMC-D the existing one comes first anyway --
smcd_cdc_rx_tsklet() reads rmb_desc->cpu_addr at :452 before it calls
smc_cdc_msg_recv() at all. Line numbers are against net/main at
e095f249e220.
What the bot is pointing at is a separate defect. smc_conn_create() puts the
connection in the link group's token tree before smc_buf_create() allocates
the RMB, so a CDC arriving in that window finds a connection whose buffer is
still unset -- with or without this series. That one is fixed by [PATCH net
v4] "net/smc: order the CDC receive path against buffer publication", which
publishes the buffers with smp_store_release() once the receive state is
initialised and makes the CDC entry points bail while they are unset:
https://lore.kernel.org/all/20260728-b4-disp-52ee4e7d-v4-1-0dda94b0f397@proton.me/
Thanks,
Bryam
next prev parent reply other threads:[~2026-07-28 17:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 0:23 [PATCH net v5 0/3] net/smc: bound wire-controlled CDC cursors against the local buffers Bryam Vargas via B4 Relay
2026-07-24 0:23 ` [PATCH net v5 1/3] net/smc: bound the wire-controlled producer cursor to the RMB Bryam Vargas via B4 Relay
2026-07-25 0:23 ` sashiko-bot
2026-07-28 13:50 ` Paolo Abeni
2026-07-28 17:25 ` Bryam Vargas [this message]
2026-08-14 6:03 ` Sidraya Jayagond
2026-07-24 0:23 ` [PATCH net v5 2/3] net/smc: bound the receive length to the RMB in smc_rx_recvmsg() Bryam Vargas via B4 Relay
2026-07-25 0:23 ` sashiko-bot
2026-08-14 6:03 ` Sidraya Jayagond
2026-07-24 0:23 ` [PATCH net v5 3/3] net/smc: bound the send length to the send buffer in smc_tx_sendmsg() Bryam Vargas via B4 Relay
2026-07-25 0:23 ` sashiko-bot
2026-08-14 6:04 ` Sidraya Jayagond
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=20260728172552.69349-1-hexlabsecurity@proton.me \
--to=hexlabsecurity@proton.me \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjambigi@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=raspl@linux.ibm.com \
--cc=sidraya@linux.ibm.com \
--cc=tonylu@linux.alibaba.com \
--cc=ubraun@linux.ibm.com \
--cc=wenjia@linux.ibm.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