From owner-freebsd-stable@freebsd.org Thu Feb 21 15:27:19 2019 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADEDF14E4B67 for ; Thu, 21 Feb 2019 15:27:19 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D5E47758C for ; Thu, 21 Feb 2019 15:27:18 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id x1LFRG2b098135; Thu, 21 Feb 2019 16:27:16 +0100 (CET) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 93BDE7E5; Thu, 21 Feb 2019 16:27:16 +0100 (CET) Subject: Re: libcrypto.so.111 linked binaries SIGSEGV (in bhyve guest) To: Konstantin Belousov Cc: freebsd-stable References: <335630bc-a558-9e31-5e2d-aee6237e83b0@omnilan.de> <596d1486-e2af-43f7-6f3f-65881e91819d@omnilan.de> <20190221085432.GR2420@kib.kiev.ua> <20190221093645.GS2420@kib.kiev.ua> From: Harry Schmalzbauer Organization: OmniLAN Message-ID: Date: Thu, 21 Feb 2019 16:27:16 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20190221093645.GS2420@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Thu, 21 Feb 2019 16:27:16 +0100 (CET) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-Rspamd-Queue-Id: 2D5E47758C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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: Thu, 21 Feb 2019 15:27:19 -0000 Am 21.02.2019 um 10:36 schrieb Konstantin Belousov: … >> >> ELF Header: >> Magic: 7f 45 4c 46 02 01 01 09 00 00 00 00 00 00 00 00 >> Class: ELF64 >> Data: 2's complement, little endian >> Version: 1 (current) >> OS/ABI: FreeBSD >> ABI Version: 0 >> Type: DYN (Shared object file) >> Machine: Advanced Micro Devices x86-64 >> Version: 0x1 >> Entry point address: 0x116000 >> Start of program headers: 64 (bytes into file) >> Start of section headers: 3090864 (bytes into file) >> Flags: 0 >> Size of this header: 64 (bytes) >> Size of program headers: 56 (bytes) >> Number of program headers: 8 >> Size of section headers: 64 (bytes) >> Number of section headers: 29 >> Section header string table index: 28 >> >> Elf file type is DYN (Shared object file) >> Entry point 0x116000 >> There are 8 program headers, starting at offset 64 >> >> Program Headers: >> Type Offset VirtAddr PhysAddr >> FileSiz MemSiz Flg Align >> PHDR 0x0000000000000040 0x0000000000000040 0x0000000000000040 >> 0x00000000000001c0 0x00000000000001c0 R 0x8 >> LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 >> 0x0000000000115a7c 0x0000000000115a7c R 0x1000 >> LOAD 0x0000000000116000 0x0000000000116000 0x0000000000116000 >> 0x00000000001acb20 0x00000000001acb20 R E 0x1000 >> LOAD 0x00000000002c3000 0x00000000002c3000 0x00000000002c3000 >> 0x000000000002f790 0x00000000000325e0 RW 0x1000 >> DYNAMIC 0x00000000002f1a80 0x00000000002f1a80 0x00000000002f1a80 >> 0x0000000000000190 0x0000000000000190 RW 0x8 >> GNU_RELRO 0x00000000002c9000 0x00000000002c9000 0x00000000002c9000 >> 0x0000000000029790 0x0000000000029790 R 0x1 >> GNU_EH_FRAME 0x00000000000d0050 0x00000000000d0050 0x00000000000d0050 >> 0x000000000000bc74 0x000000000000bc74 R 0x4 >> GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 >> 0x0000000000000000 0x0000000000000000 RW 0 >> >> Section to Segment mapping: >> Segment Sections... >> 00 >> 01 (null) (null) (null) (null) (null) (null) (null) (null) >> (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) >> (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) >> 02 >> 03 >> 04 >> 05 >> 06 >> 07 (null) (null) (null) (null) (null) (null) (null) (null) >> (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) >> (null) (null) (null) (null) (null) (null) (null) (null) (null) (null) >> There are 29 section headers, starting at offset 0x2f29b0: >> … > The object is clearly corrupted. Thanks to your hint to readelf, I found out that it gets corrupted during dump(8) (or resotore, not yet analyzed). The obj tree contains the good version, the dump archive not. The dump archive is used as source for the ISO, hence the described errors. Now I have to dig in 10 years old deployment scripts to track down and reproduce the corruption. No explanation so far, but for sure no rtld-elf problem :-) And also not a problem in the FreeBSD make chain, building stable/12 on stable/11 works as intended and doesn't produce the mutilated libcrypto.so.111! Thanks, -harry