FreeBSD Bugzilla – Attachment 177482 Details for
Bug 214881
jail with path=/ and sysctl.disablefullpath=1 leads to NULL dereference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Check for path == NULL.
1.patch (text/plain), 645 bytes, created by
Konstantin Belousov
on 2016-11-28 13:25:54 UTC
(
hide
)
Description:
Check for path == NULL.
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2016-11-28 13:25:54 UTC
Size:
645 bytes
patch
obsolete
>diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c >index a1734e1..b42a172 100644 >--- a/sys/kern/kern_jail.c >+++ b/sys/kern/kern_jail.c >@@ -953,8 +953,9 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) > VOP_UNLOCK(root, 0); > if (fullpath_disabled) { > /* Leave room for a real-root full pathname. */ >- if (len + (path[0] == '/' && strcmp(mypr->pr_path, "/") >- ? strlen(mypr->pr_path) : 0) > MAXPATHLEN) { >+ if (len + (path != NULL && path[0] == '/' && >+ strcmp(mypr->pr_path, "/") ? >+ strlen(mypr->pr_path) : 0) > MAXPATHLEN) { > error = ENAMETOOLONG; > vrele(root); > goto done_free;
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 214881
: 177482 |
177588