Skip to content

Commit cf87a2c

Browse files
committed
smb: client: fix wrong index reference in smb2_compound_op()
JIRA: https://issues.redhat.com/browse/RHEL-114295 commit fbe2dc6 Author: Sang-Heon Jeon <ekffu200098@gmail.com> Date: Tue Sep 23 17:16:45 2025 +0900 smb: client: fix wrong index reference in smb2_compound_op() In smb2_compound_op(), the loop that processes each command's response uses wrong indices when accessing response bufferes. This incorrect indexing leads to improper handling of command results. Also, if incorrectly computed index is greather than or equal to MAX_COMPOUND, it can cause out-of-bounds accesses. Fixes: 3681c74 ("smb: client: handle lack of EA support in smb2_query_path_info()") # 6.14 Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Paulo Alcantara <paalcant@redhat.com>
1 parent dffd7ee commit cf87a2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/smb2inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
687687
}
688688

689689
for (i = 0; i < num_cmds; i++) {
690-
char *buf = rsp_iov[i + i].iov_base;
690+
char *buf = rsp_iov[i + 1].iov_base;
691691

692692
if (buf && resp_buftype[i + 1] != CIFS_NO_BUFFER)
693693
rc = server->ops->map_error(buf, false);

0 commit comments

Comments
 (0)