Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.org>
To: Stefan Metzmacher <metze@samba.org>
Cc: metze@samba.org, Namjae Jeon <linkinjeon@kernel.org>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	stable@vger.kernel.org
Subject: Re: [PATCH 0/8] smb: client: fix use-after-free of server->smbd_conn and the encryption nonce
Date: Sun, 29 Nov 2026 13:01:54 -0300	[thread overview]
Message-ID: <66467ca68dc0c9ccab8f4237a45e151d@manguebit.org> (raw)
In-Reply-To: <cover.1795782695.git.metze@samba.org>

Stefan Metzmacher <metze@samba.org> writes:

> Hi Paulo,
>
> these are client fixes reported by Sashiko:
>
>   - smbd_get_parameters(), smbd_register_mr() and
>     smbd_debug_proc_show() used server->smbd_conn without any
>     locking, while cifs_abort_connection() can destroy it at any
>     time (use-after-free). server->smbd_conn is now only changed
>     under srv_lock and only used with a reference on its socket
>     (the new smbdirect_socket_get()/put()) or under the lock.
>
>   - smb3_negotiate_wsize() and smb3_negotiate_rsize() used the zero
>     limits of a missing connection during a reconnect, with signing
>     the header sizes were subtracted from 0, which underflows, so the
>     RDMA limit was lost.
>
>   - smbd_get_connection() returns the real error instead of -ENOENT,
>     the following patches depend on that.
>
>   - The nonce of encrypted messages is a 64-bit counter of the
>     session followed by random bits of the session, like Samba does,
>     instead of random bytes, which only made a reuse unlikely. With
>     AES-GCM a reused nonce reveals the authentication key.
>
> "smb: smbdirect: add smbdirect_socket_get() and smbdirect_socket_put()"
> touches fs/smb/smbdirect, it's only used by the client changes.
>
> Reports fixed by this series:
>
>   - https://sashiko.dev/#/patchset/cover.1791225453.git.metze%40samba.org
>       smb: client: don't use server->smbd_conn without a reference or lock
>
>   - https://sashiko.dev/#/bug/linux-211bb822-8907-4243-9dd3-da2595595552
>       smb: client: don't use server->smbd_conn without a reference or lock
>
>   - https://sashiko.dev/#/bug/linux-d40006cd-d7c3-4ea8-8ebb-1bf2b55b0db0
>       smb: client: don't use zero RDMA limits without a connection

Thanks metze.

Applied.

      parent reply	other threads:[~2026-11-29 16:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 12:41 [PATCH 0/8] smb: client: fix use-after-free of server->smbd_conn and the encryption nonce Stefan Metzmacher
2026-11-27 12:41 ` [PATCH 1/8] smb: smbdirect: add smbdirect_socket_get() and smbdirect_socket_put() Stefan Metzmacher
2026-11-27 12:41 ` [PATCH 2/8] smb: client: return the real error from smbd_get_connection() Stefan Metzmacher
2026-11-27 12:41 ` [PATCH 3/8] smb: client: change server->smbd_conn only under server->srv_lock Stefan Metzmacher
2026-11-27 12:41 ` [PATCH 4/8] smb: client: pass server to smbd_get_parameters() Stefan Metzmacher
2026-11-27 12:41 ` [PATCH 5/8] smb: client: pass server to smbd_register_mr() Stefan Metzmacher
2026-11-27 12:41 ` [PATCH 6/8] smb: client: don't use server->smbd_conn without a reference or lock Stefan Metzmacher
2026-11-27 12:41 ` [PATCH 7/8] smb: client: don't use zero RDMA limits without a connection Stefan Metzmacher
2026-11-27 12:41 ` [PATCH 8/8] smb: client: use a counter for the nonce of encrypted messages Stefan Metzmacher
2026-11-27 13:55 ` [PATCH 0/8] smb: client: fix use-after-free of server->smbd_conn and the encryption nonce Stefan Metzmacher
2026-11-28  1:01 ` Namjae Jeon
2026-11-29 16:01 ` Paulo Alcantara [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=66467ca68dc0c9ccab8f4237a45e151d@manguebit.org \
    --to=pc@manguebit.org \
    --cc=bharathsm@microsoft.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=metze@samba.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sprasad@microsoft.com \
    --cc=stable@vger.kernel.org \
    --cc=tom@talpey.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