[Bug 275270] sanitizer re-exec with ASLR off fails
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275270] sanitizer re-exec with ASLR off fails"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275270] sanitizer re-exec with ASLR off fails"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275270] sanitizer re-exec with ASLR off fails"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Nov 2023 22:28:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275270 Bug ID: 275270 Summary: sanitizer re-exec with ASLR off fails Product: Base System Version: 14.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: emaste@freebsd.org CC: dim@FreeBSD.org Blocks: 275215 Tracking PR for 14.0 EN for: commit 4c9a0adad18263ec8725d9bfc5f560c6ad1da8bd Author: Dimitry Andric <dim@FreeBSD.org> Date: Wed Nov 22 19:23:06 2023 +0100 compiler-rt: avoid segfaults when re-exec'ing with ASLR After 930a7c2ac67e ("compiler-rt: re-exec with ASLR disabled when necessary") and 96fe7c8ab0f6 ("compiler-rt: support ReExec() on FreeBSD"), binaries linked against the sanitizer libraries may segfault due to procctl(2) being intercepted. Instead, the non-intercepted internal_procctl() should be called. Similarly, the ReExec() function that re-executes the binary after turning off ASLR should not call elf_aux_info(3) and realpath(3), since these will also be intercepted. Instead, loop directly over the elf aux info vector to find the executable path, and avoid calling realpath(3) since it is actually unwanted for this use case. Fixes: 930a7c2ac67e, 96fe7c8ab0f6 MFC after: 3 days Referenced Bugs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275215 [Bug 275215] tracking bug for 14.0 errata -- You are receiving this mail because: You are the assignee for the bug.