From owner-freebsd-stable@freebsd.org Mon Sep 16 05:45:34 2019 Return-Path: Delivered-To: freebsd-stable@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 6ED9AF3AA3 for ; Mon, 16 Sep 2019 05:45:34 +0000 (UTC) (envelope-from dewaynegeraghty@gmail.com) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 46WwFT40zlz48p1 for ; Mon, 16 Sep 2019 05:45:33 +0000 (UTC) (envelope-from dewaynegeraghty@gmail.com) Received: by mail-wr1-x42b.google.com with SMTP id b9so3834583wrs.0 for ; Sun, 15 Sep 2019 22:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=/KJ7facieY0AR5N0BPo/sfq2UNRwmYe7n3hSCoPFJEE=; b=iKZFyCRjiezW2AXQrIdmX1pXDqSHEnmNtbOYQ8eBTUQ0z/ay2Ug1F0KC/0Z2T/tLxb r4S2NdAEzHy8qmSdXX8RyPozuNzeSgtJVJlzo883oCvKXK3+MQYbuozuc0sF7qzT5Q3D gktstVhTivQRzssik5EIw5BUrmW6NJQd7KGLh9I6AwJoomTUSlxYYa4qDpG9H/Y2Rv// 78WDuRThCTZrM73xTjDCvThy2N1BbVGgZ97AxMrDAPpT8Kl6O8HHMmZMnf9Y+xpaOIHe zVjfjXtALsvwfoivAqcdCYX/X+xrJuvPIaaq7Wd0B2OQ+HmcCNrza1WScQLEjOFVEyGE V/ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/KJ7facieY0AR5N0BPo/sfq2UNRwmYe7n3hSCoPFJEE=; b=hbjpuFmz8wkJKCMnRnhjcapBDy935m7w3uTNhKRbKoH/pzo6gpBkx+O2EGxNETnI6D 6eS/X2O+4avvZS8ybbD9pWDBQpjuV2PKfO4OMJGlOUqxyKgzGVhZBIjXdvedJg+ZG5P/ 7i65kJuUtjS6rzICuAcelAqs7QMAvAXlaJZets3ZjpDbjqLjXFzM8tO/waScFRkhOOQ8 3FFFW1c2ic5eWCoi1K/XG4sbqV05YEQ/YiXbudLaTTGGk8qMjXD7cnRSsTBkeYbHzx8m zHqbLeYzs1XsDCDW1V0XlvrcKo7yY4H6CKNmi+4GbIfc/1WRk+3KyBfyFdF3cHWyngxD aOHg== X-Gm-Message-State: APjAAAW9LD4LqqJtvImgzklMdedbXlj3JiUI3sYD1SqUjdbyssq1/+ya 1ZtwvJNij/GSKf9tl2hxXQt3vpAEtjwTmWJLqugFdQgS4Xg= X-Google-Smtp-Source: APXvYqz/qyGFE2w3wHwxYbF137neH9cpiT6DAqDcceLXZlA+TyYB2aXR6kNkpfjs7MegZOPYE87clGejWpdobuoZBXM= X-Received: by 2002:adf:de0d:: with SMTP id b13mr19154532wrm.140.1568612730983; Sun, 15 Sep 2019 22:45:30 -0700 (PDT) MIME-Version: 1.0 From: Dewayne Geraghty Date: Mon, 16 Sep 2019 15:45:04 +1000 Message-ID: Subject: ASLR requirement for images To: freebsd-stable stable X-Rspamd-Queue-Id: 46WwFT40zlz48p1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=iKZFyCRj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of dewaynegeraghty@gmail.com designates 2a00:1450:4864:20::42b as permitted sender) smtp.mailfrom=dewaynegeraghty@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(0.00)[ip: (-9.31), ipnet: 2a00:1450::/32(-2.95), asn: 15169(-2.24), country: US(-0.05)]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[b.2.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2019 05:45:34 -0000 >From the comment at https://reviews.freebsd.org/D5603 "The procctl(2) control for ASLR is implemented, [but] I have not provided a userspace wrapper around the syscall. In fact, the most reasonable control needed is per-image and not per-process, but we have no tradition to put the kernel-read attributes into the extattrs of binary, so I am still pondering that part and this also explains the non-written tool." I think its time to revisit the approach. Storing the attributes within the extattr is preferable to a central file - we're very fortunate to have the MAC framework, perhaps a MAC_ASLR is required (to identify those applications that can/can't use ASLR)? Other applications also make use of protection bits inside extattr, notably samba4. References: https://reviews.freebsd.org/D19281 mac_veriexec: Create kernel module to parse manifest based on envs.