Merge tag 'v7.2-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - Credit fix

 - Fix alignment issue in parse_posix_ctxt

 - SID parsing fix

* tag 'v7.2-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Fix missing credit release on failure in cifs_issue_read()
  cifs: update internal module version number
  smb: client: use unaligned reads in parse_posix_ctxt()
  smb: client: harden POSIX SID length parsing
This commit is contained in:
Linus Torvalds
2026-07-03 15:01:33 -10:00
3 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -166,6 +166,6 @@ extern const struct export_operations cifs_export_ops;
#endif /* CONFIG_CIFS_NFSD_EXPORT */
/* when changing internal version - update following two lines at same time */
#define SMB3_PRODUCT_BUILD 60
#define CIFS_VERSION "2.60"
#define SMB3_PRODUCT_BUILD 61
#define CIFS_VERSION "2.61"
#endif /* _CIFSFS_H */
+1
View File
@@ -241,6 +241,7 @@ static void cifs_issue_read(struct netfs_io_subrequest *subreq)
return;
failed:
add_credits_and_wake_if(rdata->server, &rdata->credits, 0);
subreq->error = rc;
netfs_read_subreq_terminated(subreq);
}
+4 -4
View File
@@ -2396,9 +2396,9 @@ parse_posix_ctxt(struct create_context *cc, struct smb2_file_all_info *info,
memset(posix, 0, sizeof(*posix));
posix->nlink = le32_to_cpu(*(__le32 *)(beg + 0));
posix->reparse_tag = le32_to_cpu(*(__le32 *)(beg + 4));
posix->mode = le32_to_cpu(*(__le32 *)(beg + 8));
posix->nlink = get_unaligned_le32(beg);
posix->reparse_tag = get_unaligned_le32(beg + 4);
posix->mode = get_unaligned_le32(beg + 8);
sid = beg + 12;
sid_len = posix_info_sid_size(sid, end);
@@ -5405,7 +5405,7 @@ int posix_info_sid_size(const void *beg, const void *end)
size_t subauth;
int total;
if (beg + 1 > end)
if (beg + 2 > end)
return -1;
subauth = *(u8 *)(beg+1);