The Samba-Bugzilla – Attachment 16747 Details for
Bug 14742
Calling Windows info levels with SMB1trans2:setpathinfo with a POSIX connection on symlinks can crash smbd.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.14.next.
0001-s3-smbd-Fix-smbd-crash-on-dangling-symlink-with-posi.patch (text/plain), 2.02 KB, created by
Jeremy Allison
on 2021-08-20 15:46:13 UTC
(
hide
)
Description:
git-am fix for 4.14.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2021-08-20 15:46:13 UTC
Size:
2.02 KB
patch
obsolete
>From 832d612ab5404a8a421989c9b85d937df12caec1 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 15 Jun 2021 15:42:33 -0700 >Subject: [PATCH] s3: smbd: Fix smbd crash on dangling symlink with posix > connection calling several non-posix info levels. > >Tidy up fsp == NULL checks. Remove knownfail. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14742 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Noel Power <npower@samba.org> > >Autobuild-User(master): Noel Power <npower@samba.org> >Autobuild-Date(master): Wed Jun 16 11:58:00 UTC 2021 on sn-devel-184 > >(cherry picked from commit 263c95aee38c9198ad9a30c4d960d72f46b7c27a) >--- > source3/smbd/trans2.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index fac45df586e..70a492a96a8 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -785,6 +785,10 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, > return NT_STATUS_EAS_NOT_SUPPORTED; > } > >+ if (fsp == NULL) { >+ return NT_STATUS_INVALID_HANDLE; >+ } >+ > posix_pathnames = (fsp->fsp_name->flags & SMB_FILENAME_POSIX_PATH); > > status = refuse_symlink(conn, fsp, fsp->fsp_name); >@@ -6860,7 +6864,7 @@ static NTSTATUS smb_set_file_full_ea_info(connection_struct *conn, > struct ea_list *ea_list = NULL; > NTSTATUS status; > >- if (!fsp) { >+ if (fsp == NULL) { > return NT_STATUS_INVALID_HANDLE; > } > >@@ -7899,6 +7903,10 @@ static NTSTATUS smb_set_file_basic_info(connection_struct *conn, > return NT_STATUS_INVALID_PARAMETER; > } > >+ if (fsp == NULL) { >+ return NT_STATUS_INVALID_HANDLE; >+ } >+ > status = check_access_fsp(fsp, FILE_WRITE_ATTRIBUTES); > if (!NT_STATUS_IS_OK(status)) { > return status; >@@ -7956,6 +7964,10 @@ static NTSTATUS smb_set_info_standard(connection_struct *conn, > return NT_STATUS_INVALID_PARAMETER; > } > >+ if (fsp == NULL) { >+ return NT_STATUS_INVALID_HANDLE; >+ } >+ > /* create time */ > ft.create_time = time_t_to_full_timespec(srv_make_unix_date2(pdata)); > /* access time */ >-- >2.30.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review+
Actions:
View
Attachments on
bug 14742
:
16662
|
16663
|
16743
| 16747