mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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:
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user