Skip to content

Commit 1085215

Browse files
committed
cifs: Fix oops due to uninitialised variable
jira KERNEL-318 cve CVE-2025-38737 Rebuild_History Non-Buildable kernel-6.12.0-124.20.1.el10_1 commit-author David Howells <dhowells@redhat.com> commit 453a6d2 Fix smb3_init_transform_rq() to initialise buffer to NULL before calling netfs_alloc_folioq_buffer() as netfs assumes it can append to the buffer it is given. Setting it to NULL means it should start a fresh buffer, but the value is currently undefined. Fixes: a2906d3 ("cifs: Switch crypto buffer to use a folio_queue rather than an xarray") Signed-off-by: David Howells <dhowells@redhat.com> cc: Steve French <sfrench@samba.org> cc: Paulo Alcantara <pc@manguebit.org> cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com> (cherry picked from commit 453a6d2) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 3464b11 commit 1085215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/smb2ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4509,7 +4509,7 @@ smb3_init_transform_rq(struct TCP_Server_Info *server, int num_rqst,
45094509
for (int i = 1; i < num_rqst; i++) {
45104510
struct smb_rqst *old = &old_rq[i - 1];
45114511
struct smb_rqst *new = &new_rq[i];
4512-
struct folio_queue *buffer;
4512+
struct folio_queue *buffer = NULL;
45134513
size_t size = iov_iter_count(&old->rq_iter);
45144514

45154515
orig_len += smb_rqst_len(server, old);

0 commit comments

Comments
 (0)