diff options
author | Andreas Schneider <asn@samba.org> | 2021-02-01 12:03:17 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2021-02-03 21:23:55 +0000 |
commit | eac2d1504b72d766762f2991c0acd1355835a2cd (patch) | |
tree | ac883e03de56cabe6973a77b761e2c9d37307748 | |
parent | cc1568be4d4250390a9ad03c84f5e260fc7acffd (diff) | |
download | samba-eac2d1504b72d766762f2991c0acd1355835a2cd.tar.gz |
s3:smbd: Fix invalid memory access in posix_sys_acl_blob_get_fd()
We are handing down an out of scope buffer.
Found by AddressSanitizer.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14627
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 0a93f5367bc55ee14f13da5bdb812333c9d9e9f3)
-rw-r--r-- | source3/smbd/posix_acls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 041305d4aec..c1d5b7cd047 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -4651,12 +4651,12 @@ int posix_sys_acl_blob_get_fd(vfs_handle_struct *handle, TALLOC_CTX *frame; struct smb_acl_wrapper acl_wrapper = { 0 }; int fd = fsp_get_pathref_fd(fsp); + char buf[PATH_MAX] = {0}; struct smb_filename fname; int ret; if (fsp->fsp_flags.have_proc_fds) { const char *proc_fd_path = NULL; - char buf[PATH_MAX]; proc_fd_path = sys_proc_fd_path(fd, buf, sizeof(buf)); if (proc_fd_path == NULL) { |