From nobody Tue Feb 04 13:49:16 2025 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 4YnPqJ65WTz5mr9l for ; Tue, 04 Feb 2025 13:49:16 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YnPqJ5YYtz3wMl for ; Tue, 04 Feb 2025 13:49:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738676956; 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=oh6JatGNGo77AaSJr4sShlNXug8xrVTrnk+neWUplLo=; b=KYNHXjOfKb1wSmBaqIP0pQTlkWb3IB7e4xpkTTIJzhw1LdfjIZ3Q9cT4/rmwM0zfFEMiAn 9ljHLgXdon9+pGnS1TWtIkOs+NhpdTvoWKUe56dvV4PuBboF8Tor7gblkpjZGwu7D0izr3 BFJ2T2J56/u05oDO9idTtvoc5rICjBl90U+xN2nFNhXVYqdYg71S+SZJ6G4LYHNGOtZyQt uv4Ak/lez62DU5Y0H5T0/am7IliI/2JbWLtEhsI+GEgnx8j2QyGD/pGMmX/4GC/sYd0Dls y/HOsyPliJxIJRo9298rcTe5IALGCb8ZOxPNTt5hQtvIP/hWAp4USGbJtT9A3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738676956; 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=oh6JatGNGo77AaSJr4sShlNXug8xrVTrnk+neWUplLo=; b=kQNm2gkKC9LwTlkYJUiwRww5TwQZU52I6U82VTXyOHUBMczqbcUGns7bAvYfUqKr/rq/4P yLd3ebUwjS49uharIsjbmsgu61fCe/VdXdn8RZQ9noueZKtEwbVb0u++ThSoZ504QMXyI5 zJlVQNxvyLDDXfCWktp6Bt54mn9dbGbJw9yMk1cOoyqiXDxRB5DPVeuDtgXKmeR/BU9CRx ifjh2iwfvUJpzxuHOe0PPrsIdAS+0KZR/7IeVriGq8CwM7j5ULJxT0X4SMNIe6ja+Zj7i3 Xl6dcLrh/rFL8//u2Mxy2irdiHykvmx+dpudco00mycyjJRHhS77pGliDoQWVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738676956; a=rsa-sha256; cv=none; b=S5Cti80fREe587v8VyaWRCOExxM5uhrfD7Y5O061GifDKa8461wtZAh3s8OTqhhPBFptJm HcWfSKP8ERXBg75wcyVpoAQzk52xLmwEc0jJSxf5M1fYi11+PO7R8j8z/S883GpRN5YPDe oBIYAza3W6SPRM/86cbbHdk4U1oHTYi0QxD1dH4c0+/xSeLkVoKh3X4mroBGjBSpfy9BLE 3nmxandcafE4qo+34AdAjq6Mcdfvoc1QarKHGzs99bpYWzi6MvUKjmeV2scC+wyodS2xE3 4e3ATQSoO9tHSIbtdcYRWG1rchuMWsDDmFpjauIysuXzY0su4auYUSsFrbdSZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YnPqJ55kYz1NPt for ; Tue, 04 Feb 2025 13:49:16 +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 514DnGs7036357 for ; Tue, 4 Feb 2025 13:49:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 514DnGVG036356 for bugs@FreeBSD.org; Tue, 4 Feb 2025 13:49:16 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 284563] Holes in struct rtld_utrace Date: Tue, 04 Feb 2025 13:49:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 14.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pjfloyd@wanadoo.fr 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 Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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=3D284563 Bug ID: 284563 Summary: Holes in struct rtld_utrace Product: Base System Version: 14.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: pjfloyd@wanadoo.fr The definition of struct rtld_utrace is struct utrace_rtld { char sig[RTLD_UTRACE_SIG_SZ]; int event; /* 4 byte hole */ void *handle; void *mapbase; /* Used for 'parent' and 'init/fini= ' */ size_t mapsize; int refcnt; /* Used for 'mode' */ /* 4 byte hole */ char name[MAXPATHLEN]; }; And the interface for utrace is 335 AUE_NULL STD|CAPENABLED { int utrace( _In_reads_bytes_(len) const void *addr, size_t len ); } I don't know what other uses of utrace exise, but rtld ld_utrace_log does n= ot memset utrace_rtld to 0 before filling the fields, leaving the holes uninitialized. This poses a problem for Valgrind memcheck testing the syscall parameters. = At present it just uses the pointer and length to indicate memory that will be read in the syscall (abd should be initialized). I can fix this in Valgrind= by using struct utrace_rtld. I think that a better fix would be on the FreeBSD side by putting the 'even= t' and 'refcnt' fields together. Would that be possible without breaking backw= ards compatibility? --=20 You are receiving this mail because: You are the assignee for the bug.=