diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-06-11 10:07:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-06-11 10:07:35 -0700 |
commit | 65d7ca5987f29f4c3d5c0889d2f046bb246d18d4 (patch) | |
tree | 5209b574c08d2621b55237f87e56997818fe6036 /fs/smb/server/vfs.c | |
parent | 022ce8862dff83c859089cd14bc4dca0733e2f90 (diff) | |
parent | 1c1bcf2d3ea061613119b534f57507c377df20f9 (diff) | |
download | linux-stable-65d7ca5987f29f4c3d5c0889d2f046bb246d18d4.tar.gz linux-stable-65d7ca5987f29f4c3d5c0889d2f046bb246d18d4.tar.bz2 linux-stable-65d7ca5987f29f4c3d5c0889d2f046bb246d18d4.zip |
Merge tag '6.4-rc5-smb3-server-fixes' of git://git.samba.org/ksmbd
Pull smb server fixes from Steve French:
"Five smb3 server fixes, all also for stable:
- Fix four slab out of bounds warnings: improve checks for protocol
id, and for small packet length, and for create context parsing,
and for negotiate context parsing
- Fix for incorrect dereferencing POSIX ACLs"
* tag '6.4-rc5-smb3-server-fixes' of git://git.samba.org/ksmbd:
ksmbd: validate smb request protocol id
ksmbd: check the validation of pdu_size in ksmbd_conn_handler_loop
ksmbd: fix posix_acls and acls dereferencing possible ERR_PTR()
ksmbd: fix out-of-bound read in parse_lease_state()
ksmbd: fix out-of-bound read in deassemble_neg_contexts()
Diffstat (limited to 'fs/smb/server/vfs.c')
-rw-r--r-- | fs/smb/server/vfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c index 6f302919e9f7..f9fb778247e7 100644 --- a/fs/smb/server/vfs.c +++ b/fs/smb/server/vfs.c @@ -1321,7 +1321,7 @@ static struct xattr_smb_acl *ksmbd_vfs_make_xattr_posix_acl(struct mnt_idmap *id return NULL; posix_acls = get_inode_acl(inode, acl_type); - if (!posix_acls) + if (IS_ERR_OR_NULL(posix_acls)) return NULL; smb_acl = kzalloc(sizeof(struct xattr_smb_acl) + @@ -1830,7 +1830,7 @@ int ksmbd_vfs_inherit_posix_acl(struct mnt_idmap *idmap, return -EOPNOTSUPP; acls = get_inode_acl(parent_inode, ACL_TYPE_DEFAULT); - if (!acls) + if (IS_ERR_OR_NULL(acls)) return -ENOENT; pace = acls->a_entries; |