From nobody Wed Nov 22 22:28:06 2023 X-Original-To: bugs@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 4SbG925whZz51G8D for ; Wed, 22 Nov 2023 22:28:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SbG922pf9z4m7c for ; Wed, 22 Nov 2023 22:28:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700692086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8qwZI+adM78bDMqkg1dVqlAs+948pNzv80y1iLXEBE4=; b=spJfIrBCf7UFG/VCaNgTqKCQjvn6tDZ/bus4vYyikCBn5YMt0VOURiE2g+NdCfIgBX0PPK wcmBWLNHw/eKovKNhrlSUUp9vsmKlb5k2q8DgUi2TyXUlVe7eFJ1NHCVNb35QvuWJwDlu5 8k3Z/bFSSTP5FZnekR6dvQcmHd2roORlF/1/uPzPhcSwOeiKO/rt2HHcPSEz/8XhhJk1he NFsit8znqTvcYb7V1XyXz7h4N2BTmxYZoHdXZhRyiGEXEDoUthuhJoS+IzCdoV3YXl67Ul Fv3X+rfW5HfiCZ0qA2SmPVjC39G+WGpUPaBfyTAoSIU9gd3l+6EdcxQg9V+W9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700692086; a=rsa-sha256; cv=none; b=XXppStCo9GdeTp80s6YJXqRy7pIZmqyKKx99Yfu+C296X1Es+2JAYiTtHRyrVQm5ybfcFq gC/g3MLV62ASYbShMy3TbQGH48wpyT1i0OYCWl4WvRmntYtZX2nPKOot3UI7Lp0UY+3EFA HQl711lorOuGxoeVunuTzkJHJJl54Yb1dS+9amgwkQnFHlzHTKVfRi5sKz3mquecOppxmz olSGRXARgi+GwHGm27DnPvJIq1Sfh3XIEWP00mdTHGhNDih6kVQSeyR0SGKnalUusZYJUh frargz1RpE3oCAJdefNWrN8ZSzox+gza2RgllHvOmn+FoYYGao0t6TMPufsDHQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SbG921sfxzcZ2 for ; Wed, 22 Nov 2023 22:28:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3AMMS6ss003061 for ; Wed, 22 Nov 2023 22:28:06 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3AMMS6pa003060 for bugs@FreeBSD.org; Wed, 22 Nov 2023 22:28:06 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 275270] sanitizer re-exec with ASLR off fails Date: Wed, 22 Nov 2023 22:28:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc blocked Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275270 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 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=3D275215 [Bug 275215] tracking bug for 14.0 errata --=20 You are receiving this mail because: You are the assignee for the bug.=