From: Stefan Metzmacher <metze@samba.org>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: "zdi-disclosures@trendmicro.com" <zdi-disclosures@trendmicro.com>,
"security@kernel.org" <security@kernel.org>,
"open list:SMBDIRECT (RDMA Stream Transport with Read/Writ..."
<linux-cifs@vger.kernel.org>, Paulo Alcantara <pc@manguebit.org>,
"moderated list:SMBDIRECT (RDMA Stream Transport with
Read/Writ..." <samba-technical@lists.samba.org>,
open list <linux-kernel@vger.kernel.org>,
Tom Talpey <tom@talpey.com>
Subject: Re: ZDI-CAN-33549: New Vulnerability Report
Date: Fri, 23 Oct 2026 13:02:15 +0200 [thread overview]
Message-ID: <08f2aebc-a45b-489d-ab31-d7f65b5c35cf@samba.org> (raw)
In-Reply-To: <CAKYAXd__odzY0tuTu3mNgjmYibc3Js+zgNGYb9q0ywms7L9j+w@mail.gmail.com>
Am 23.10.26 um 12:36 schrieb Namjae Jeon:
> On Fri, Oct 23, 2026 at 6:04 PM Stefan Metzmacher <metze@samba.org> wrote:
>>
>> Am 22.10.26 um 00:16 schrieb Stefan Metzmacher via samba-technical:
>>> Hi HYEONTAE LEE,
>>>
>>> would you be able to test if this is reproducable on this branch:
>>> https://git.samba.org/?p=metze/linux/wip.git;a=shortlog;h=refs/heads/for-7.5/smbdirect
>>> git clone -b for-7.5/smbdirect https://git.samba.org/metze/linux/wip.git for-7.5-smbdirect
>>>
>>> I guess it's already fixed with that.
>>>
>>> Thanks!
>>> metze
>>>
>>> Am 21.10.26 um 23:16 schrieb zdi-disclosures@trendmicro.com:
>>>> ZDI-CAN-33549: Linux Kernel KSMBD SMB Direct Integer Underflow Remote Code Execution Vulnerability
>>>>
>>>> -- CVSS -----------------------------------------
>>>>
>>>> 9.0: AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
>>>>
>>>> -- ABSTRACT -------------------------------------
>>>>
>>>> Trend Micro's Zero Day Initiative has identified a vulnerability affecting the following products:
>>>> Linux - Kernel KSMBD
>>>>
>>>> -- VULNERABILITY DETAILS ------------------------
>>>> * Version Tested:7.3-rc3
>>>> * Platform Tested:debian trixie
>>>>
>>>> ---
>>>>
>>>> ### Analysis
>>>>
>>>> integer underflow in smbdirect_connection_rdma_xmit()
>>>> The reproduce kernel built with CONFIG_SMB_SERVER_SMBDIRECT=y + CONFIG_RDMA_RXE=y
>>>> Here is the target requirement
>>>> 1) RDMA device
>>>> 2) writable share
>>>> 3) smb direct (ubuntu only)
>>>>
>>>> ~~~C++
>>>> int smbdirect_connection_rdma_xmit(struct smbdirect_socket *sc,
>>>> void *buf, size_t buf_len,
>>>> struct smbdirect_buffer_descriptor_v1 *desc,
>>>> size_t desc_len,
>>>> bool is_read)
>>>> {
>>>> ...
>>>> for (i = 0; i < desc_len / sizeof(*desc); i++) {
>>>> if (!buf_len)
>>>> break;
>>>>
>>>> desc_buf_len = le32_to_cpu(desc[i].length);
>>>> if (!desc_buf_len)
>>>> return -EINVAL;
>>>>
>>>> if (desc_buf_len > buf_len) {
>>>> desc_buf_len = buf_len;
>>>> desc[i].length = cpu_to_le32(desc_buf_len);
>>>> buf_len = 0; // (1)
>>>> }
>>>>
>>>> credits_needed += smbdirect_connection_calc_rw_credits(sc,
>>>> desc_buf,
>>>> desc_buf_len);
>>>> desc_buf += desc_buf_len;
>>>> buf_len -= desc_buf_len; // (2) integer underflow, and leads to heap overflow within rxe_mr_copy()
>>>> desc_num++;
>>>> }
>>
>> As far as I can see the problem is solved in by patches,
>> but we should have a simple fix first.
>>
>> I think removing ' buf_len = 0;' should be enough for a quick fix,
>> then 'buf_len -= desc_buf_len;' will result in buf_len == 0 and the next
>> iteration will break with if (!buf_len).
>>
>> Namjae, do you agree? Can you create such a quick fix?
> Agreed, Please check the attached patch.
> Thanks for checking this issue!
Thanks, looks good.
metze
prev parent reply other threads:[~2026-10-23 11:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 21:16 zdi-disclosures
2026-10-21 22:16 ` Stefan Metzmacher
2026-10-23 9:04 ` Stefan Metzmacher
2026-10-23 10:36 ` Namjae Jeon
2026-10-23 11:02 ` Stefan Metzmacher [this message]
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=08f2aebc-a45b-489d-ab31-d7f65b5c35cf@samba.org \
--to=metze@samba.org \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=samba-technical@lists.samba.org \
--cc=security@kernel.org \
--cc=tom@talpey.com \
--cc=zdi-disclosures@trendmicro.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
all inboxes | Powered by JetHome®