The Samba-Bugzilla – Attachment 18758 Details for
Bug 15897
Assert failed: (dirfd != -1) || (smb_fname->base_name[0] == '/') in vfswrap_openat
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch from master for v4-22-test
v4.22.patch (text/plain), 3.07 KB, created by
Anoop C S
on 2025-10-15 11:28:15 UTC
(
hide
)
Description:
patch from master for v4-22-test
Filename:
MIME Type:
Creator:
Anoop C S
Created:
2025-10-15 11:28:15 UTC
Size:
3.07 KB
patch
obsolete
>From 41cf886a7336458902bfa42447f2b1d476f4a751 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Sun, 7 Sep 2025 21:57:27 +0200 >Subject: [PATCH 1/2] smbd: Fix Bug 15897 > >Don't leak smb_dirname->fsp->fh->fd == -1 coming from >openat_pathref_fsp_lcomp(). > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=15897 >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Anoop C S <anoopcs@samba.org> > >Autobuild-User(master): Volker Lendecke <vl@samba.org> >Autobuild-Date(master): Wed Sep 10 09:37:33 UTC 2025 on atb-devel-224 > >(cherry picked from commit 7143caeecc856d3326fdc3eb466ef1f37bc564b5) >--- > source3/smbd/filename.c | 16 +++------------- > 1 file changed, 3 insertions(+), 13 deletions(-) > >diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c >index 164e84361e2..edba28d25de 100644 >--- a/source3/smbd/filename.c >+++ b/source3/smbd/filename.c >@@ -753,19 +753,9 @@ filename_convert_dirfsp_nosymlink(TALLOC_CTX *mem_ctx, > } > > if (dirname[0] == '\0') { >- smb_dirname = synthetic_smb_fname( >- mem_ctx, >- ".", >- NULL, >- NULL, >- 0, >- posix ? SMB_FILENAME_POSIX_PATH : 0); >- if (smb_dirname == NULL) { >- return NT_STATUS_NO_MEMORY; >- } >- status = openat_pathref_fsp_lcomp(basedir, >- smb_dirname, >- UCF_POSIX_PATHNAMES); >+ status = openat_pathref_fsp_dot( >+ mem_ctx, basedir, >+ posix ? SMB_FILENAME_POSIX_PATH : 0, &smb_dirname); > } else { > status = normalize_filename_case(conn, dirname, ucf_flags); > if (!NT_STATUS_IS_OK(status)) { >-- >2.51.0 > > >From b2a2e2ce641038a9b23c8622eb92b9ee51f7a55f Mon Sep 17 00:00:00 2001 >From: Anoop C S <anoopcs@samba.org> >Date: Thu, 11 Sep 2025 11:41:25 +0530 >Subject: [PATCH 2/2] smbd: Fix CID 1665417, UNUSED_VALUE in > openat_pathref_fsp_dot() > >Rearrange how the open flags are defined so as to make Coverity happy >about it. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15897 > >Signed-off-by: Anoop C S <anoopcs@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Anoop C S <anoopcs@samba.org> >Autobuild-Date(master): Mon Sep 15 15:44:38 UTC 2025 on atb-devel-224 > >(cherry picked from commit 1ec54347acac241f900b52c16c2dcba04164e898) >--- > source3/smbd/files.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/source3/smbd/files.c b/source3/smbd/files.c >index 0f1eaaa88d6..3e9b59ad69f 100644 >--- a/source3/smbd/files.c >+++ b/source3/smbd/files.c >@@ -1671,9 +1671,7 @@ NTSTATUS openat_pathref_fsp_dot(TALLOC_CTX *mem_ctx, > struct connection_struct *conn = dirfsp->conn; > struct files_struct *fsp = NULL; > struct smb_filename *full_fname = NULL; >- struct vfs_open_how how = { >- .flags = O_RDONLY | O_NONBLOCK | O_NOFOLLOW, >- }; >+ struct vfs_open_how how = { .flags = O_NOFOLLOW, }; > struct smb_filename *dot = NULL; > NTSTATUS status; > int fd; >@@ -1683,7 +1681,9 @@ NTSTATUS openat_pathref_fsp_dot(TALLOC_CTX *mem_ctx, > #endif > > #ifdef O_PATH >- how.flags = O_PATH; >+ how.flags |= O_PATH; >+#else >+ how.flags |= (O_RDONLY | O_NONBLOCK); > #endif > > dot = synthetic_smb_fname(mem_ctx, ".", NULL, NULL, 0, flags); >-- >2.51.0 >
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
Actions:
View
Attachments on
bug 15897
:
18708
|
18714
|
18727
|
18758
|
18759