From nobody Fri Dec 10 09:15:33 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1704918ED108 for ; Fri, 10 Dec 2021 09:16:34 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net [IPv6:2403:5800:5200:4700:225:90ff:fe47:39b4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "dons.net.au", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J9QJK0pDyz4hfS for ; Fri, 10 Dec 2021 09:16:32 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.16.1/8.16.1) with ESMTPS id 1BA9FxqW074227 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 10 Dec 2021 19:46:25 +1030 (ACDT) (envelope-from darius@dons.net.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dons.net.au; s=default; t=1639127790; bh=rCdDbmzOgsqHWb5Z8Ow1/1fnNEeb46uGotV+zpwGjzE=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=d8KJrMOTF1mEFu1Q1epRnH97goTIZtsuWsqPJsK4sjvAC+YcPIUwDUMwPXNfAUU9x K1e4ljdMWNrDJA4NWmUF+w6xTKqPcMakdHPJVPg1Eg+u9LoDCHIWOl7t5vxC5Yl2LW k5oDS1OI/R5NitQbIO5fPpTvRGE4Sle3JM6vpGA0= Received: (from mailnull@localhost) by midget.dons.net.au (8.16.1/8.16.1/Submit) id 1BA9FYrj074196 for ; Fri, 10 Dec 2021 19:45:34 +1030 (ACDT) (envelope-from darius@dons.net.au) X-MIMEDefang-Relay-f0f0b4ff001831caa5b8ac39868c4c7e9b4d12fc: 2403:5800:5200:4700:792f:b02:6699:af48 Received: from smtpclient.apple (2403-5800-5200-4700-792f-b02-6699-af48.ip6.aussiebb.net [2403:5800:5200:4700:792f:b02:6699:af48]) by 2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net (envelope-sender ) (MIMEDefang) with ESMTP id 1BA9FYOW074187; Fri, 10 Dec 2021 19:45:34 +1030 Content-Type: text/plain; charset=us-ascii List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: HEADS-UP: ASLR for 64-bit executables enabled by default on main In-Reply-To: Date: Fri, 10 Dec 2021 19:45:33 +1030 Cc: freebsd-current@freebsd.org, Fabien Thomas , MARECHAL Boris , Rafal Jaworowski , Damien DEVILLE Content-Transfer-Encoding: quoted-printable Message-Id: <7101CA73-DCAD-4DEF-9861-C62789D22596@dons.net.au> References: To: Marcin Wojtas X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Score: 0.8 () No, score=0.8 required=5.0 tests=KHOP_HELO_FCRDNS, PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_NONE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.4 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 4J9QJK0pDyz4hfS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dons.net.au header.s=default header.b=d8KJrMOT; dmarc=pass (policy=quarantine) header.from=dons.net.au; spf=pass (mx1.freebsd.org: domain of darius@dons.net.au designates 2403:5800:5200:4700:225:90ff:fe47:39b4 as permitted sender) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [-2.63 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.959]; R_DKIM_ALLOW(-0.20)[dons.net.au:s=default]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[dons.net.au:+]; DMARC_POLICY_ALLOW(-0.50)[dons.net.au,quarantine]; NEURAL_HAM_SHORT(-0.17)[-0.170]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:4764, ipnet:2403:5800:5000::/36, country:AU]; MID_RHS_MATCH_FROM(0.00)[] Reply-To: darius@dons.net.au From: Daniel O'Connor via freebsd-current X-Original-From: Daniel O'Connor X-ThisMailContainsUnwantedMimeParts: N > On 17 Nov 2021, at 09:00, Marcin Wojtas wrote: > As of b014e0f15bc7 the ASLR (Address Space Layout > Randomization) feature becomes enabled for the all 64-bit > binaries by default. Firstly, thank your for your efforts here, it is appreciated :) I am finding that the lang/sdcc port is crashing with a seg fault and = the core dump is no help to me at all: [freebsd14 7:06] /usr/ports/lang/sdcc/work/sdcc-4.0.0/device/lib >sudo = gdb ../../bin/sdcc sdcc.core GNU gdb (GDB) 11.1 [GDB v11.1 for FreeBSD] Reading symbols from ../../bin/sdcc... [New LWP 100122] Core was generated by `../../bin/sdcc -I../../device/include = -I../../device/include/mcs51 -mds390 --nos'. Program terminated with signal SIGSEGV, Segmentation fault. Invalid permissions for mapped object. #0 0x0000000804e3fbc0 in setrlimit () from /lib/libc.so.7 (gdb) info thread Id Target Id Frame * 1 LWP 100122 0x0000000804e3fbc0 in setrlimit () from = /lib/libc.so.7 (gdb) bt #0 0x0000000804e3fbc0 in setrlimit () from /lib/libc.so.7 Backtrace stopped: Cannot access memory at address 0x7fffff87fd08 If I disable ASLR (via proccontrol) then it does not crash, but I am not = sure how I can debug it further. I've raised a bug = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260303 if you (or = anyone else) has suggestions for what to try. Thanks. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum