From nobody Tue Dec 02 06:13:59 2025 X-Original-To: ports-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 4dL9T31tB0z6JnL1 for ; Tue, 02 Dec 2025 06:13:59 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dL9T30ZxBz3Nfr for ; Tue, 02 Dec 2025 06:13:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764656039; 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=jKPTL/IhzlCngVMNV4+E9kbwCKEPTg6kVHDDqmbliBA=; b=K5Y7dyRW1tg6Eak1UhOpMWJO+0ZK0PG9okoUgrZQV5cYSIwGaL0dDpA7EdyWO3n9wZ7RXc 6Q/EzEwFqgcjQMVdxPLX5AYkAUYSYQ6y/ZHWnka+Q5XDHN6AcbrqzAQl3qVeRvopwSb+Zx 4ArIvaXm3bNtgh0+WgP2s3AqRTCKQ/nxq5+iL8nSqXAoRa777HthgEuk/nVYkWlxnnE2Vq QNKsM2T+dwlNDMZSfkRpM5+dldpc0TXD8qtK853gw8ZQKlfbHj9k6HyKmjSYs6HCHnd742 Rx/oEqQgPkZXJHohxEEUKxeEP396pNNXsuXz18hJxelMp5yiSZcQx7juynjl1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1764656039; 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=jKPTL/IhzlCngVMNV4+E9kbwCKEPTg6kVHDDqmbliBA=; b=qhwUoCKv6lR/0YujF5S4kGUDkemQD/1vobEeyjU4EGtQ13SMgBwb9TB1gjlVXjRgfmnI1a YpVczuyLFRh5nJ1JdxP7LvK8SUE2k84RrvJj8qIlypDOZCzL50unLXyvjrtRvkoE9mTNIY /Nd3/x3JwxXOXsNOXsxXwy1t80xzWweTKdh4Rij0JKV9HcSJccuC1Vv9HrQ1XbTvLw9gFR VmMbiqbXP9HluCbA4bqW6/TcMCrca6/ClAnMR4/FHTQqRMJNzz+MeMjM4IRbBs5Z33PPKb eY4z9QNXW6sja45rhSUdE1qAZZ4Zk3nlCdoQqsSm60Q63q8Tinl+xyFTCgOPzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1764656039; a=rsa-sha256; cv=none; b=C1Lcc7zIlUlZ/11IIEFeIrDnbf+uBTWO7cYpbl53xHCXj97ePnefAADlWCeFRu1gK0+vib 9Yrwy7z4r8l++zQFl2XwhDFSV/Kqa9XCARdexw2zWFG8ZOqXSw0deTomGVKmVZ7pr/wN1S 8yJ8SAWYEwJUieXKYYphd4sR9j25KMfw5sI2/uGns/fQmb5spjUnGqZvJq6kDR07jGBXWl VmtU6mE0VR0KpJokWdz47Z+Peo1d4NtrQsK7LH44siQqUIp12Kl2iHPQlyxnOmytRmW60O Ah+qS4RAdFBTb35JYUdmJmerQjwd8WI+lyz2t1nYdBMvrEwx92VC0qNCM+1uLQ== 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 4dL9T305TpzvJq for ; Tue, 02 Dec 2025 06:13:59 +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 5B26Dw4h090480 for ; Tue, 2 Dec 2025 06:13:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 5B26DwE9090478 for ports-bugs@FreeBSD.org; Tue, 2 Dec 2025 06:13:58 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: ports-bugs@FreeBSD.org Subject: [Bug 291343] Ports can use fetched files that are not fingerprinted Date: Tue, 02 Dec 2025 06:13:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yuri@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: portmgr@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 attachments.created 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: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D291343 Bug ID: 291343 Summary: Ports can use fetched files that are not fingerprinted Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Ports Framework Assignee: portmgr@FreeBSD.org Reporter: yuri@freebsd.org CC: ports-bugs@FreeBSD.org Created attachment 265766 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D265766&action= =3Dedit testcase-fetched-file-no-fingerprint.tgz The attached sample port downloads and installs a file that isn't in DISTFI= LES and doesn't have a record in distinfo. In this example it downloads https://google.com/index.html and installs it = as ${DATADIR}/possibly-malicious.html, but it can be any file. The files fetched in the fetch target but not listed in DISTFILES can be installed like this. I am not saying that there are malicious ports, but the ports framework enforces cryptographic fingerprints on all used distfiles, and this example uses a loophole and some files might not be fingerprinted. The following solution can solve the above problem: Poudriere should use a dedicated DISTDIR for each package build process. (1) Before the fetch: Poudriere would copy all declared DISTFILES (if they exist) from the common build directory into this dedicated directory. (2) After the fetch: Poudriere would check that there are no files in the dedicated directory that aren't declared in the DISTFILES file. (3) After the build: Poudriere would copy them back from the dedicated directory into a common directory. --=20 You are receiving this mail because: You are on the CC list for the bug.=