FreeBSD Bugzilla – Attachment 208592 Details for
Bug 241421
net/ntp segfaults with stack_gap!=0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
This has been tested to circumvent this PR.
ntpd-port.diff (text/plain), 1.60 KB, created by
Cy Schubert
on 2019-10-25 06:13:50 UTC
(
hide
)
Description:
This has been tested to circumvent this PR.
Filename:
MIME Type:
Creator:
Cy Schubert
Created:
2019-10-25 06:13:50 UTC
Size:
1.60 KB
patch
obsolete
>diff --git a/net/ntp/files/patch-ntpd_ntpd.c b/net/ntp/files/patch-ntpd_ntpd.c >index 3f8187a072e4..d49e66c00363 100644 >--- a/net/ntp/files/patch-ntpd_ntpd.c >+++ b/net/ntp/files/patch-ntpd_ntpd.c >@@ -1,10 +1,43 @@ > --- ntpd/ntpd.c.orig 2019-02-20 09:21:44.000000000 -0800 >-+++ ntpd/ntpd.c 2019-09-20 12:11:54.469651000 -0700 >-@@ -999,7 +999,7 @@ >++++ ntpd/ntpd.c 2019-10-24 19:21:44.229660000 -0700 >+@@ -137,6 +137,8 @@ >+ # include <sys/resource.h> >+ # include <seccomp.h> >+ #endif /* LIBSECCOMP and KERN_SECCOMP */ >++#include <sys/types.h> >++#include <sys/sysctl.h> >+ >+ #ifdef HAVE_DNSREGISTRATION >+ # include <dns_sd.h> >+@@ -790,6 +792,13 @@ >+ int fd; >+ int zero; >+ # endif >++ int aslr = 0; >++ int aslr_len = sizeof(aslr); >++#ifdef __LP64__ >++ char *aslr_var = "kern.elf64.aslr.enable"; >++#else >++ char *aslr_var = "kern.elf32.aslr.enable"; >++#endif >+ >+ # ifdef NEED_PTHREAD_WARMUP >+ my_pthread_warmup(); >+@@ -998,8 +1007,16 @@ >+ /* Setup stack size in preparation for locking pages in memory. */ > # if defined(HAVE_MLOCKALL) > # ifdef HAVE_SETRLIMIT >- ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096, 4096, "4k"); >+- ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096, 4096, "4k"); > -# ifdef RLIMIT_MEMLOCK >++ >++ if ((rc = sysctlbyname(aslr_var, &aslr, &aslr_len, NULL, 0)) != 0) >++ msyslog(LOG_ERR, >++ "sysctlbyname: %s: %s", >++ aslr_var, >++ strerror(rc)); >++ >++ if (aslr == 0) >++ ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096, 4096, "4k"); > +# if defined(RLIMIT_MEMLOCK) && defined(DFLT_RLIMIT_MEMLOCK) && DFLT_RLIMIT_MEMLOCK != -1 > /* > * The default RLIMIT_MEMLOCK is very low on Linux systems.
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 241421
:
208549
|
208585
| 208592