From owner-svn-src-head@freebsd.org Mon May 15 19:52:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8FE8D6E302; Mon, 15 May 2017 19:52:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44FD3E5F; Mon, 15 May 2017 19:52:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4FJqaVl007300 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 May 2017 22:52:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4FJqaVl007300 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4FJqaQm007299; Mon, 15 May 2017 22:52:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 15 May 2017 22:52:36 +0300 From: Konstantin Belousov To: Alexey Dokuchaev Cc: Nikolai Lifanov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore Subject: Re: svn commit: r318313 - head/libexec/rtld-elf Message-ID: <20170515195236.GK1622@kib.kiev.ua> References: <201705151848.v4FImwMW070221@repo.freebsd.org> <20170515185236.GB1637@FreeBSD.org> <20170515190030.GG1622@kib.kiev.ua> <1494875335.59865.118.camel@freebsd.org> <20170515192529.GH1622@kib.kiev.ua> <20170515193609.GC28684@FreeBSD.org> <20170515194049.GJ1622@kib.kiev.ua> <20170515194223.GE28684@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170515194223.GE28684@FreeBSD.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 19:52:42 -0000 On Mon, May 15, 2017 at 07:42:23PM +0000, Alexey Dokuchaev wrote: > On Mon, May 15, 2017 at 10:40:49PM +0300, Konstantin Belousov wrote: > > On Mon, May 15, 2017 at 03:37:42PM -0400, Nikolai Lifanov wrote: > > > On 05/15/2017 15:36, Alexey Dokuchaev wrote: > > > > ... > > > > Would this now allow executing binaries (with or without +x bit) from > > > > filesystems mounted with -o noexec? > > > > > > No: > > > > > > # zfs create -o mountpoint=/mnt -o exec=off tank/TEST > > > # cp /bin/sh /mnt/ > > > # /mnt/sh > > > /mnt/sh: Permission denied. > > > # /libexec/ld-elf.so.1 /mnt/sh > > > /mnt/sh: mmap of data failed: Permission denied > > > > This is due to > > r313967 | kib | 2017-02-19 22:51:04 +0200 (Sun, 19 Feb 2017) | 24 lines > > Apply noexec mount option for mmap(PROT_EXEC). > > Nice, good to know that. [Replying to random mail in thread] I tried this on an up to date latest Fedora installation: [kostik@sandy ~]$ cp /bin/ls /tmp [kostik@sandy ~]$ chmod a-x /tmp/ls [kostik@sandy ~]$ /lib64/ld-linux-x86-64.so.2 /tmp/ls Dropbox intel tmp work I am not sure about one detail, the /tmp/ls file has some security context on it, but I do not believe that it may affect the outcome of the experiment. Please correct me if I am wrong.