The Samba-Bugzilla – Attachment 18225 Details for
Bug 15554
Crash due to misuse of readdir in cap_readdir plus other misuses of struct dirent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Downstream patch for 4.16
D43171.diff (text/plain), 1.08 KB, created by
Ralph Böhme
on 2024-01-10 06:31:27 UTC
(
hide
)
Description:
Downstream patch for 4.16
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2024-01-10 06:31:27 UTC
Size:
1.08 KB
patch
obsolete
>diff --git a/net/samba416/files/patch-source3_modules_vfs__cap.c b/net/samba416/files/patch-source3_modules_vfs__cap.c >new file mode 100644 >--- /dev/null >+++ b/net/samba416/files/patch-source3_modules_vfs__cap.c >@@ -0,0 +1,20 @@ >+--- source3/modules/vfs_cap.c.orig 2022-01-24 10:26:59 UTC >++++ source3/modules/vfs_cap.c >+@@ -112,7 +112,16 @@ static struct dirent *cap_readdir(vfs_handle_struct *h >+ return NULL; >+ } >+ talloc_set_name_const(newdirent, "struct dirent"); >+- memcpy(newdirent, result, sizeof(struct dirent)); >++ /* See FreeBSD bug #275597 for an explanation of this patch. */ >++ /* memcpy(newdirent, result, sizeof(struct dirent)); */ >++ newdirent->d_pad1 = result->d_pad1 ; >++ newdirent->d_namlen = result->d_namlen ; >++ newdirent->d_pad0 = result->d_pad0 ; >++ newdirent->d_type = result->d_type ; >++ newdirent->d_reclen = result->d_reclen ; >++ newdirent->d_off = result->d_off ; >++ newdirent->d_fileno = result->d_fileno ; >++ /*******************************************************************/ >+ memcpy(&newdirent->d_name, newname, newnamelen); >+ return newdirent; >+ } >
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 15554
: 18225