From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Pavel Paklov <Pavel.Paklov@cyberprotect.ru>,
Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1] smb: client: fix double free of TCP_Server_Info::hostname
Date: Mon, 5 May 2025 11:13:55 -0400 [thread overview]
Message-ID: <20250505074437-2be4ff98f8f823c8@stable.kernel.org> (raw)
In-Reply-To: <20250503175819.2818701-1-Pavel.Paklov@cyberprotect.ru>
[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected.
No action required from the submitter.
The upstream commit SHA1 provided is correct: fa2f9906a7b333ba757a7dbae0713d8a5396186e
WARNING: Author mismatch between patch and upstream commit:
Backport author: Pavel Paklov<Pavel.Paklov@cyberprotect.ru>
Commit author: Paulo Alcantara<pc@manguebit.com>
Status in newer kernel trees:
6.14.y | Present (exact SHA1)
6.12.y | Present (different SHA1: a2be5f2ba34d)
6.6.y | Present (different SHA1: 1ea680703385)
Note: The patch differs from the upstream commit:
---
1: fa2f9906a7b33 ! 1: 56e7a9b9b42bb smb: client: fix double free of TCP_Server_Info::hostname
@@
## Metadata ##
-Author: Paulo Alcantara <pc@manguebit.com>
+Author: Pavel Paklov <pavel.paklov@cyberprotect.ru>
## Commit message ##
smb: client: fix double free of TCP_Server_Info::hostname
+ From: Paulo Alcantara <pc@manguebit.com>
+
+ commit fa2f9906a7b333ba757a7dbae0713d8a5396186e upstream
+
When shutting down the server in cifs_put_tcp_session(), cifsd thread
might be reconnecting to multiple DFS targets before it realizes it
should exit the loop, so @server->hostname can't be freed as long as
@@ Commit message
Reported-by: Jay Shin <jaeshin@redhat.com>
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
+ Signed-off-by: Pavel Paklov <pavel.paklov@cyberprotect.ru>
## fs/smb/client/connect.c ##
-@@ fs/smb/client/connect.c: clean_demultiplex_info(struct TCP_Server_Info *server)
- /* Release netns reference for this server. */
- put_net(cifs_net_ns(server));
+@@ fs/smb/client/connect.c: static void clean_demultiplex_info(struct TCP_Server_Info *server)
+ kfree(server->origin_fullpath);
kfree(server->leaf_fullpath);
+ #endif
+ kfree(server->hostname);
kfree(server);
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y | Success | Success |
prev parent reply other threads:[~2025-05-05 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-03 17:57 [PATCH 6.1] smb: client: fix double free of TCP_Server_Info::hostname Pavel Paklov
2025-05-05 15:13 ` Sasha Levin [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=20250505074437-2be4ff98f8f823c8@stable.kernel.org \
--to=sashal@kernel.org \
--cc=Pavel.Paklov@cyberprotect.ru \
--cc=stable@vger.kernel.org \
/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