NetBSD Problem Report #52495
From www@NetBSD.org Sun Aug 20 20:14:56 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 8FF3C7A20B
for <gnats-bugs@gnats.NetBSD.org>; Sun, 20 Aug 2017 20:14:56 +0000 (UTC)
Message-Id: <20170820201455.94FEC7A28F@mollari.NetBSD.org>
Date: Sun, 20 Aug 2017 20:14:55 +0000 (UTC)
From: jakllsch@kollasch.net
Reply-To: jakllsch@kollasch.net
To: gnats-bugs@NetBSD.org
Subject: ntpd doesn't get along with stack ASLR
X-Send-Pr-Version: www-1.0
>Number: 52495
>Category: misc
>Synopsis: ntpd doesn't get along with stack ASLR
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 20 20:15:00 +0000 2017
>Closed-Date: Sun Jun 03 11:20:07 +0000 2018
>Last-Modified: Sun Jun 03 11:20:07 +0000 2018
>Originator: Jonathan A. Kollasch
>Release: 8.99.1
>Organization:
>Environment:
NetBSD fhloston.kollasch.net 8.99.1 NetBSD 8.99.1 (TEGRA) #58: Sun Aug 20 14:01:27 CDT 2017 jakllsch@trantor.kollasch.net:/sd0a/jakllsch/obj-evbearmv7hf/sys/arch/evbarm/compile/TEGRA evbarm
>Description:
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).
>How-To-Repeat:
Start ntpd, observe syslog often says:
ntpd[568]: ntp_rlimit: Cannot set RLIMIT_STACK: Invalid argument
>Fix:
>Release-Note:
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: misc/52495: ntpd doesn't get along with stack ASLR
Date: Mon, 21 Aug 2017 09:57:30 +0200
See also PR 50048.
Martin
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, misc-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, jakllsch@kollasch.net
Cc:
Subject: Re: misc/52495: ntpd doesn't get along with stack ASLR
Date: Mon, 21 Aug 2017 04:12:42 -0400
On Aug 21, 8:00am, martin@duskware.de (Martin Husemann) wrote:
-- Subject: Re: misc/52495: ntpd doesn't get along with stack ASLR
| See also PR 50048.
That is different and it has been fixed...
christos
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 03 Jun 2018 11:20:07 +0000
State-Changed-Why:
duplicate 51158
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.