From nobody Thu Nov 18 15:19:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7FE1618892B8; Thu, 18 Nov 2021 15:20:19 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hw3QB4tVfz3HQP; Thu, 18 Nov 2021 15:20:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f45.google.com with SMTP id f9so8316699ioo.11; Thu, 18 Nov 2021 07:20:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PJXeYQcdkrtfS80B6LhZIZP+ucuDySBao1lTOnHa42M=; b=B3R/47WPXcieK3IA9PDScWYgTzMcHSBXz9Sil+DkVfxt2KN2kV3477t+gNf4mWKSQR DIYPpHe5SzvkHjufJg9PmsqxV7ksj336IcJp6sOpzAtxwmES9X2SkbgPz1pjcErBnWZV 9wH5oMnVe02oPnDRvtViHDDrLWExf8raIjvSRc5+ubMG3IN+HCbp3bgN9pVnvI7BoUeo Vz1GstnbnsrnRXXRij1E59IEJptK0xgM91l8n27yjdedZ8gaPcFYGbukyufPaxfOyJ8a G1f8fkV4+mL1STK1SSaQMLyCSXROBhMJk2iAtuCyY13UToA1XxaO/UHurSeLHOHwee65 ebsA== X-Gm-Message-State: AOAM532tWJYAFY1U+5d0LmuCgJirWGkqhT7MRobM3x3NI3a+1hpIeDjX nNeTO75cHmMf9b749hxcTnDmhbtNDImhBfLUHSeLytHG X-Google-Smtp-Source: ABdhPJxHYlUfI0XugZ7Zq7FG15Z0I3LF+KUUiA/ENk3VzTDRwo6bZfxNsNQgUdJmaRD0clo1wB45houdm4BIqJAdeZg= X-Received: by 2002:a05:6638:2656:: with SMTP id n22mr21512258jat.35.1637248811631; Thu, 18 Nov 2021 07:20:11 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202111162226.1AGMQg00099240@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Thu, 18 Nov 2021 10:19:52 -0500 Message-ID: Subject: Re: git: b014e0f15bc7 - main - Enable ASLR by default for 64-bit executables To: Kubilay Kocak Cc: Marcin Wojtas , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Hw3QB4tVfz3HQP 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.45 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-0.995]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.45:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.45:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Tue, 16 Nov 2021 at 18:42, Kubilay Kocak wrote: > > The current description seems ambiguous with respect to the added > comment. If the sysctl (=1) applies ASLR "only" for PIE binaries, where > the =0 (sysctl disabled) case applies it unconditionally, a better > description might be: > > "Enable address map randomization only for PIE binaries" The "only" is in a confusing spot there. For ET_EXEC ELF objects (traditional binaries) randomization is controlled by aslr_enable. For ET_DYN ELF objects (PIE binaries) randomization is controlled by pie_aslr_enable. > Might aslr_enabled_pie_only also be a better OID name? Perhaps not worth > the churn, but long term it would be great if OID names reflected what > they are/do, rather than what they're not/don't do. That's true, and I think aslr_enable_pie may be a better name. I don't see how "they're not/don't do" applies here though. > > +static int __elfN(aslr_honor_sbrk) = 0; > > SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW, > > &__elfN(aslr_honor_sbrk), 0, > > __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used"); > > > > Can we add (DEPRECATED) to the control description, and/or otherwise > mark the control as deprecated if the sysctl framework supports an > attribute marking them as such? The sbrk system call is deprecated, not the sysctl node.