From nobody Tue Jul 7 20:57:51 2026 X-Original-To: dev-commits-src-all@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 4gvtpm0rPfz6kSwd for ; Tue, 07 Jul 2026 20:57:52 +0000 (UTC) (envelope-from git@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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gvtpl5RxHz3lvK for ; Tue, 07 Jul 2026 20:57:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqTLQ9CH3PIFOXbiGDt3rqAaUoUcP7WPfhltFc6qcS8=; b=vpdVaPSprcy2pkB32Kz5MJEp9hbeUY5jl7k639C/9faddL8iXWH0tGvF6ImNaQDxeAr5Tu +9HXx+ol9PRtO2cWWpy2+gZicNMfEBvvzfCGFmpEiROuRRXXRM0flk9I212Aq3eQlM8ncy 9OVJPIYwaHPNcpfAyDHiMWVYJGr+w7UxDeUIEXiLd1HsAgpkNmwiOaIcLncB1PdClNzcsO DEK0p8JcimLSly2BkEDsqnGwl8/asOW7e+8sX3t8QG9ivIWWoQF+yuNT7+Cnklgn0istkW KklhQbLObiapNVXU9ajrk23tkWJ/O3C3228hlef7JfdgI+H6kv4QSRZaDCeYSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783457871; a=rsa-sha256; cv=none; b=iy6kKNn4874GVuLFaX8qBWx50alkvEN1lfz5hwxw1ASE9e7l1W9mS8ZyyrwBBSv2rHSXJm 8H+ckg5ZvtoUgbwo0rYaw2Bye78bE73r9Lj3ssBylsymhlrfX/pVoZH9vc3iBYhLewCEcY FqIPwkUgyT1gxbQNax2gvW4nHAbiegRNVJZLcJ5rLTVLKbL7UnmQxnXDsbt/IWfJv3MUT2 rALPwpsHoMrP31LzViBhoiftu5SUf+iMNu8VP8Gdf8gyHyXrhoblYzqfYuvmXfsfJLBxjL sBX8FTSSOcATWHvofVV1j93vNIt6yDTJsqYFPxns/A+0Mp09SztetLU4uGMNww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783457871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqTLQ9CH3PIFOXbiGDt3rqAaUoUcP7WPfhltFc6qcS8=; b=vWJXDUKrY4r77Z8kavJBWSqXlI/mNor9EkgvQesr9THUPXSj4lncfP6u9aJlLUCYoTrVGw BcpnFLvnQrjK6hoMXUaeKRC6jr0FionS1IiGYc8WT2PnrdNvSULnQpjv395fZ9GXiGIaKY JmVXtQxJLy6llxK970BIOJWkQD2gtCp3XT6HA14O6hNawnTDfwWkGJ6QEN3by57TF2RFew ubWH7OuK3PkQjk7ZVivIlyeqYez25EI6z8nXJoR4ai0sJwYlkkpbte/68wJr5Gr/kd+k8t AcINJpjFKnz4osJ6ub4fsPRAPa9coolnloYpjze1cl/LBeP3tNd8Aa2Y8vMwNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gvtpl1MQvzr4c for ; Tue, 07 Jul 2026 20:57:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18c11 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 07 Jul 2026 20:57:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 4336554f94cf - stable/15 - tests/aslr: Fix spurious test failures List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4336554f94cf11c106a3fb5d2b77fdcfb9ab571e Auto-Submitted: auto-generated Date: Tue, 07 Jul 2026 20:57:51 +0000 Message-Id: <6a4d684f.18c11.5954b57f@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4336554f94cf11c106a3fb5d2b77fdcfb9ab571e commit 4336554f94cf11c106a3fb5d2b77fdcfb9ab571e Author: Mark Johnston AuthorDate: 2026-07-03 19:28:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-07-07 07:07:16 +0000 tests/aslr: Fix spurious test failures /sbin/ping and /sbin/ping6 are hard-linked, and the vmmap sysctl handler doesn't know which name was used to launch the process. PR: 296116 MFC after: 3 days Fixes: 080a4087014e ("tests: Fix race condition in aslr_setuid") (cherry picked from commit 81cf9a0ca765b48a430da61c221be17c4d0f753a) --- tests/sys/kern/aslr.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/sys/kern/aslr.c b/tests/sys/kern/aslr.c index 966ea5c3b83a..e0b696c5130a 100644 --- a/tests/sys/kern/aslr.c +++ b/tests/sys/kern/aslr.c @@ -88,6 +88,18 @@ text_base(pid_t pid, const char *path) return (base); } +static uint64_t +ping_text_base(pid_t pid) +{ + uint64_t base; + + base = text_base(pid, "/sbin/ping"); + if (base == 0) + /* Work around name cache inconsistency. */ + base = text_base(pid, "/sbin/ping6"); + return (base); +} + /* * Make sure that ASLR can't be disabled for a setuid executable by an * unprivileged user. @@ -115,9 +127,9 @@ ATF_TC_BODY(aslr_setuid, tc) "/sbin/ping is not setuid root"); child = spawn_ping(tc); - bases[0] = text_base(child, "/sbin/ping"); + bases[0] = ping_text_base(child); ATF_REQUIRE_MSG(bases[0] != 0, - "failed to find /sbin/ping text segment"); + "failed to find ping text segment"); arg = 0; error = procctl(P_PID, child, PROC_ASLR_STATUS, &arg); @@ -137,9 +149,9 @@ ATF_TC_BODY(aslr_setuid, tc) for (size_t i = 1; i < nitems(bases); i++) { child = spawn_ping(tc); - bases[i] = text_base(child, "/sbin/ping"); + bases[i] = ping_text_base(child); ATF_REQUIRE_MSG(bases[i] != 0, - "failed to find /sbin/ping text segment"); + "failed to find ping text segment"); error = kill(child, SIGTERM); ATF_REQUIRE(error == 0); pid = waitpid(child, &st, 0);