Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133178768
D22358.id64341.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
752 B
Referenced Files
None
Subscribers
None
D22358.id64341.diff
View Options
Index: contrib/ntp/ntpd/ntpd.c
===================================================================
--- contrib/ntp/ntpd/ntpd.c
+++ contrib/ntp/ntpd/ntpd.c
@@ -138,6 +138,10 @@
# include <seccomp.h>
#endif /* LIBSECCOMP and KERN_SECCOMP */
+#ifdef __FreeBSD_cc_version
+#include <sys/procctl.h>
+#endif
+
#ifdef HAVE_DNSREGISTRATION
# include <dns_sd.h>
DNSServiceRef mdns;
@@ -402,6 +406,19 @@
char *argv[]
)
{
+#ifdef __FreeBSD_cc_version
+ {
+ int aslr_var;
+
+ pid_t my_pid = getpid();
+
+ aslr_var = PROC_ASLR_FORCE_DISABLE;
+ if (procctl(P_PID, my_pid, PROC_ASLR_CTL, &aslr_var) != 0) {
+ msyslog(LOG_ERR,"procctl set aslr mode failed");
+ exit(255);
+ }
+ }
+#endif
return ntpdmain(argc, argv);
}
#endif /* !SYS_WINNT */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 24, 5:30 PM (15 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24138526
Default Alt Text
D22358.id64341.diff (752 B)
Attached To
Mode
D22358: NTPD Circumvent ASLR
Attached
Detach File
Event Timeline
Log In to Comment