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", }; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"