From owner-svn-src-head@freebsd.org Wed Mar 22 07:05:28 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 C7AEFD16E6D; Wed, 22 Mar 2017 07:05:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 9FB3A1AE0; Wed, 22 Mar 2017 07:05:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2M75RBB066489; Wed, 22 Mar 2017 07:05:27 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2M75RHE066483; Wed, 22 Mar 2017 07:05:27 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201703220705.v2M75RHE066483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 22 Mar 2017 07:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315701 - in head/sys: amd64/cloudabi32 amd64/cloudabi64 arm/cloudabi32 arm64/cloudabi64 i386/cloudabi32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 22 Mar 2017 07:05:28 -0000 Author: ed Date: Wed Mar 22 07:05:27 2017 New Revision: 315701 URL: https://svnweb.freebsd.org/changeset/base/315701 Log: Set the interpreter path to /nonexistent. CloudABI executables are statically linked and don't have an interpreter. Setting the interpreter path to NULL used to work previously, but r314851 introduced code that checks the string unconditionally. Running CloudABI executables now causes a null pointer dereference. Looking at the rest of imgact_elf.c, it seems various other codepaths already leaned on the fact that the interpreter path is set. Let's just go ahead and pick an obviously incorrect interpreter path to appease imgact_elf.c. MFC after: 1 week Modified: head/sys/amd64/cloudabi32/cloudabi32_sysvec.c head/sys/amd64/cloudabi64/cloudabi64_sysvec.c head/sys/arm/cloudabi32/cloudabi32_sysvec.c head/sys/arm64/cloudabi64/cloudabi64_sysvec.c head/sys/i386/cloudabi32/cloudabi32_sysvec.c Modified: head/sys/amd64/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- head/sys/amd64/cloudabi32/cloudabi32_sysvec.c Wed Mar 22 06:43:10 2017 (r315700) +++ head/sys/amd64/cloudabi32/cloudabi32_sysvec.c Wed Mar 22 07:05:27 2017 (r315701) @@ -228,4 +228,5 @@ Elf32_Brandinfo cloudabi32_brand = { .machine = EM_386, .sysvec = &cloudabi32_elf_sysvec, .compat_3_brand = "CloudABI", + .interp_path = "/nonexistent", }; Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Mar 22 06:43:10 2017 (r315700) +++ head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Mar 22 07:05:27 2017 (r315701) @@ -214,4 +214,5 @@ Elf64_Brandinfo cloudabi64_brand = { .sysvec = &cloudabi64_elf_sysvec, .flags = BI_CAN_EXEC_DYN, .compat_3_brand = "CloudABI", + .interp_path = "/nonexistent", }; Modified: head/sys/arm/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- head/sys/arm/cloudabi32/cloudabi32_sysvec.c Wed Mar 22 06:43:10 2017 (r315700) +++ head/sys/arm/cloudabi32/cloudabi32_sysvec.c Wed Mar 22 07:05:27 2017 (r315701) @@ -190,4 +190,5 @@ Elf32_Brandinfo cloudabi32_brand = { .machine = EM_ARM, .sysvec = &cloudabi32_elf_sysvec, .compat_3_brand = "CloudABI", + .interp_path = "/nonexistent", }; Modified: head/sys/arm64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Wed Mar 22 06:43:10 2017 (r315700) +++ head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Wed Mar 22 07:05:27 2017 (r315701) @@ -183,4 +183,5 @@ Elf64_Brandinfo cloudabi64_brand = { .sysvec = &cloudabi64_elf_sysvec, .flags = BI_CAN_EXEC_DYN, .compat_3_brand = "CloudABI", + .interp_path = "/nonexistent", }; Modified: head/sys/i386/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- head/sys/i386/cloudabi32/cloudabi32_sysvec.c Wed Mar 22 06:43:10 2017 (r315700) +++ head/sys/i386/cloudabi32/cloudabi32_sysvec.c Wed Mar 22 07:05:27 2017 (r315701) @@ -201,4 +201,5 @@ Elf32_Brandinfo cloudabi32_brand = { .machine = EM_386, .sysvec = &cloudabi32_elf_sysvec, .compat_3_brand = "CloudABI", + .interp_path = "/nonexistent", };