From owner-freebsd-security@freebsd.org Mon Apr 20 14:00:21 2020 Return-Path: Delivered-To: freebsd-security@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78BDF2C3DD5 for ; Mon, 20 Apr 2020 14:00:21 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495SyD3wygz4Pj9 for ; Mon, 20 Apr 2020 14:00:20 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f176.google.com with SMTP id q10so8474436ile.0 for ; Mon, 20 Apr 2020 07:00:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dZf34HU0tWjyWmfI3wCOkX1jlsKOIhX+Itc8gnFbEo8=; b=l6XM4Vo+skHg30muj6Cd5VFw3vp8Rs3IbcFqtB6zTMCYGU9+tQPRyocVoH2o1SCF3t 2cU/sedFpCzkPruGylc9CM9PSsinpyEaIqZ1ck5x+F70JzMyFPQqjGR9np8RmWCh6t90 zhoig86SSDPYoM2fBqz+EtTFzVzjnHs1ugvycfb4Ue084N75aAFGkXRcbHv6zzwD8ooz E6LkdlyPeiK50t6mkoNzUpmX1vsyS2DQMkdQg+GBUu1hmBR/XUCxSsjfvkMdEy+xphvI hKr26NNOM43yMXqzxSeycBBiajVWldWjKqesg+UMd5ERDP49x5lPsMBYQv+JuRNWHnnB zabA== X-Gm-Message-State: AGi0PuYGE5L4Dv8KaZflHDaUE/HZO/UVbYdpRMUvqs7+45OAUxe2vtPp ORS0cN1VR73POQsDAQjT4GIVzaBNVDnf0O9DZgddEQ== X-Google-Smtp-Source: APiQypJ2u4HH8ojDxzndVvFHb/9c0X9dnxVJ7n9xXxl/Yh5KBTCfNp0hN4l3+4mlXjQI5BzFCmg4J46aq9NaIbA9Zoc= X-Received: by 2002:a92:41c7:: with SMTP id o190mr15578418ila.11.1587391218926; Mon, 20 Apr 2020 07:00:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ed Maste Date: Mon, 20 Apr 2020 10:00:06 -0400 Message-ID: Subject: Re: ASLR/PIE status in FreeBSD HEAD To: Dewayne Geraghty Cc: freebsd-security@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 495SyD3wygz4Pj9 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.176 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-3.22 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-security@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[176.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.22)[ip: (-5.21), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[176.166.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 14:00:21 -0000 On Sat, 18 Apr 2020 at 04:19, Dewayne Geraghty wrote: > > I'm on a similar ride. We run applications in both i386 and amd64 jails > with FreeBSD's ASLR enabled (sendmail, squid, apache, ...) and all good. Great! > On the build server, the i386 jail with aslr enabled wasn't able to > build gcc9; so this was disabled kern.elf32.*. i386 has little spare address space and compiling applications as PIE has a significant performance impact there, so enabling it only on 64-bit seems quite reasonable. > ntp was the only real application that didn't play nicely with aslr. > Fortunately, this was very helpful: > > /usr/bin/proccontrol -m aslr -s disable /usr/local/sbin/ntpd... Yes, and you can now (if using stable/12 or -CURRENT) use elfctl to tag the binary with a note to request randomization be disabled for the process, although we really should address the underlying issue.