Date: Wed, 22 Mar 2017 07:05:27 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> 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 Message-ID: <201703220705.v2M75RHE066483@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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", };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703220705.v2M75RHE066483>