FreeBSD Bugzilla – Attachment 206337 Details for
Bug 239700
cap_fileargs(3) is not robust against long paths
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
239700.patch (text/plain), 606 bytes, created by
Mariusz Zaborski
on 2019-08-07 16:19:39 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Mariusz Zaborski
Created:
2019-08-07 16:19:39 UTC
Size:
606 bytes
patch
obsolete
>diff --git a/lib/libcasper/services/cap_fileargs/cap_fileargs.c b/lib/libcasper/services/cap_fileargs/cap_fileargs.c >index f9b7da02beb..e9ed88458f2 100644 >--- a/lib/libcasper/services/cap_fileargs/cap_fileargs.c >+++ b/lib/libcasper/services/cap_fileargs/cap_fileargs.c >@@ -185,6 +185,11 @@ fileargs_create_limit(int argc, const char * const *argv, int flags, > nvlist_add_number(limits, "mode", (uint64_t)mode); > > for (i = 0; i < argc; i++) { >+ if (strlen(argv[i]) > MAXPATHLEN) { >+ nvlist_destroy(limits); >+ errno = ENAMETOOLONG; >+ return (NULL); >+ } > nvlist_add_null(limits, argv[i]); > } >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 239700
: 206337