From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: jianqi.ren.cn@windriver.com, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1.y] smb: client: fix potential UAF in cifs_dump_full_key()
Date: Wed, 11 Dec 2024 11:32:32 -0500 [thread overview]
Message-ID: <20241211083257-e46655d92f395bfa@stable.kernel.org> (raw)
In-Reply-To: <20241211101539.2114503-1-jianqi.ren.cn@windriver.com>
[ Sasha's backport helper bot ]
Hi,
The upstream commit SHA1 provided is correct: 58acd1f497162e7d282077f816faa519487be045
WARNING: Author mismatch between patch and upstream commit:
Backport author: <jianqi.ren.cn@windriver.com>
Commit author: Paulo Alcantara <pc@manguebit.com>
Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 10e17ca4000e)
6.1.y | Not found
Note: The patch differs from the upstream commit:
---
1: 58acd1f497162 ! 1: 9ecdabdf26e97 smb: client: fix potential UAF in cifs_dump_full_key()
@@ Metadata
## Commit message ##
smb: client: fix potential UAF in cifs_dump_full_key()
+ [ Upstream commit 58acd1f497162e7d282077f816faa519487be045 ]
+
Skip sessions that are being teared down (status == SES_EXITING) to
avoid UAF.
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
+ Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
## fs/smb/client/ioctl.c ##
@@ fs/smb/client/ioctl.c: static int cifs_dump_full_key(struct cifs_tcon *tcon, struct smb3_full_key_debug
@@ fs/smb/client/ioctl.c: static int cifs_dump_full_key(struct cifs_tcon *tcon, str
@@ fs/smb/client/ioctl.c: static int cifs_dump_full_key(struct cifs_tcon *tcon, struct smb3_full_key_debug
* so increment its refcount
*/
- cifs_smb_ses_inc_refcount(ses);
+ ses->ses_count++;
+ spin_unlock(&ses_it->ses_lock);
found = true;
goto search_end;
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y | Success | Success |
next prev parent reply other threads:[~2024-12-11 16:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 10:15 [PATCH 6.1.y] smb: client: fix potential UAF in cifs_dump_full_key() jianqi.ren.cn
2024-12-11 16:32 ` Sasha Levin [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-19 2:37 jianqi.ren.cn
2025-03-19 10:54 ` Sasha Levin
2024-12-11 9:59 jianqi.ren.cn
2024-12-11 16:32 ` Sasha Levin
2024-12-09 8:58 jianqi.ren.cn
2024-12-09 14:35 ` Sasha Levin
2024-12-12 12:09 ` Greg KH
2024-12-09 4:22 jianqi.ren.cn
2024-12-09 6:00 ` Harshit Mogalapalli
2024-12-09 14:35 ` Sasha Levin
2024-12-06 8:14 jianqi.ren.cn
2024-12-06 17:11 ` Sasha Levin
2024-12-11 8:15 ` Greg KH
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=20241211083257-e46655d92f395bfa@stable.kernel.org \
--to=sashal@kernel.org \
--cc=jianqi.ren.cn@windriver.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.