Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Dec 2021 15:48:51 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        Marcin Wojtas <mw@semihalf.com>
Cc:        Daniel O'Connor <darius@dons.net.au>, freebsd-current <freebsd-current@freebsd.org>, Fabien Thomas <fabien.thomas@stormshield.eu>, MARECHAL Boris <boris.marechal@stormshield.eu>, Rafal Jaworowski <raj@semihalf.com>, Damien DEVILLE <damien.deville@stormshield.eu>
Subject:   Re: HEADS-UP: ASLR for 64-bit executables enabled by default on main
Message-ID:  <YbO9M15V2kUJ7XOl@nuc>
In-Reply-To: <CAPv3WKdTZhSB3TEWSigufw7PjNrSkBB83K3u-4RRUrJh6tjhhQ@mail.gmail.com>
References:  <CAPv3WKc=DUK8ukdqcYNgjxy96CN5kG40-ZO1SxTepUEZDavwpg@mail.gmail.com> <7101CA73-DCAD-4DEF-9861-C62789D22596@dons.net.au> <CAPv3WKdTZhSB3TEWSigufw7PjNrSkBB83K3u-4RRUrJh6tjhhQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 10, 2021 at 06:35:47PM +0100, Marcin Wojtas wrote:
> Hi Daniel
> 
> 
> pt., 10 gru 2021 o 10:16 Daniel O'Connor <darius@dons.net.au> napisaƂ(a):
> >
> >
> >
> > > On 17 Nov 2021, at 09:00, Marcin Wojtas <mw@semihalf.com> 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]
> > <snip>
> > 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=260303 if you (or anyone else) has suggestions for what to try.
> >
> 
> Thanks for filing the ticket. Let's continue the conversation there.

I left a comment there.  The gist of it is that there are several
lingering problems with the stack gap implementation, and I think we
should re-disable it on main until there's some consensus on how to
proceed.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YbO9M15V2kUJ7XOl>