NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/52495: ntpd doesn't get along with stack ASLR

>Number:         52495
>Category:       misc
>Synopsis:       ntpd doesn't get along with stack ASLR
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 20 20:15:00 +0000 2017
>Originator:     Jonathan A. Kollasch
>Release:        8.99.1
NetBSD 8.99.1 NetBSD 8.99.1 (TEGRA) #58: Sun Aug 20 14:01:27 CDT 2017 evbarm
ntpd wants to lock itself in RAM (and out of swap), to do this it attempts to reduce its maximum stack footprint.  The maximum stack footprint it currently uses is 512KiB (DFLT_RLIMIT_STACK = 128), and relatively recently as small as 256KiB (7.99.3x).  Since ASLR was enabled, we've been seeing "ntp_rlimit: Cannot set RLIMIT_STACK: Invalid argument" messages nearly ever time ntpd is started.

I'm seeing that stack size prior to reduction is as large as 2MiB.

We really don't want 2MiB of wasted physical RAM just to randomize the stack of ntpd(8).
Start ntpd, observe syslog often says:

ntpd[568]: ntp_rlimit: Cannot set RLIMIT_STACK: Invalid argument

Home | Main Index | Thread Index | Old Index