From nobody Thu Nov 13 18:35:19 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 4d6pqD53qqz6HFdH for ; Thu, 13 Nov 2025 18:35:20 +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 4d6pqD4Ycgz3tyw for ; Thu, 13 Nov 2025 18:35:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763058920; 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=ci1WQpprDl52wEu4otzkIKaMrH6LiSnl5JJCkPdbdBY=; b=s9GVgpT3yM0cvDOf3UfQP1whr5gJv45Qk3E0vFl/9kdY1wNB6QswGdS0tSOipEzfCj0t9u tnyEbo3EOX9/SpYC2rXRD84C9BmeAF9Mh5FRQg1wErl61chy2tU7MK+GvwQhkflAXkzTNJ /9LoAhDHEuW0iopBnq/j/AIPe/eikFC+8iYlmj974im7AzBwSOC2HXCwGK5CLmiBhvl+fl uEQ1S1Ru7yvLsLo2R6fHf+wjLMrosF+/V1+fPmkCm7XIoFeddfiCAKGHd1WhfLgFEG5iQq YOfHqXM3GjLlN+OezCHSAQ0LPLpFq3j5IHBPjWEJiLWsNlYhVuiPKkBGKQJYPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763058920; 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=ci1WQpprDl52wEu4otzkIKaMrH6LiSnl5JJCkPdbdBY=; b=ypM0kUwX29eggKqMFejirjK813wOCQn3D89Xk/JILudfxU6gf4GJLDs9R9JjZ8o9wjVBFd H4yfoggHWIt7BUHNDG5cBvoJRlNy22S7FfLv3qda2qHVhNz/3/4+g1phJxnqnqfP3dnP77 6l9EBejKFMMDWuADXaVEXZR7MAvTdcvFVes9K8zPA7S7Fj+xLqp1SuUznl0I+aaSuEwhAg fXbAFPV/0jVkw9lLe1q7afwAklMIzvtPqsQGUcfSbtJTcD+VbWHV08JP1PKvJIPP95GfoT i4m/e7CN+JHnvt2rzVk1BvecjjPGMDxWJZZazFXyNw4kCyCh/f9v2bx1j59lqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763058920; a=rsa-sha256; cv=none; b=IE734N+eVhP2fBTWvyBeJtoDRiAGl16K1Lj5w9ZRyXTUyjP/eHg2fTGKsXTvLI5Wr+4ykg 0JUsLqlU9qBbAt9QI5CIedwJcptTb4nyZ8n0MUUJyufroKlCzIizP0QkudyzeKbJArL2cz JMB+1ayY7AsRUUw5E57t3KVzjNQE5mRDUao5JV9hIZ4y1ei1GvJGKkhB5/6bLLtC1AgucW LIk9xFbIORbWS8vVH3g5SFLHRljaeRgpiwdjO8LwglLd3wWWMHO82hJdEr3lyr2wUN++CC m6+L0//4EC94i7OnL/BbVADqdp0tCc4umRXbHgswAMYkC0Ae3rFkNiPLabNCUw== 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 4d6pqD3k5wzYj4 for ; Thu, 13 Nov 2025 18:35:20 +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 5ADIZKc0053344 for ; Thu, 13 Nov 2025 18:35:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 5ADIZKlr053343 for ports-bugs@FreeBSD.org; Thu, 13 Nov 2025 18:35:20 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 291001] security/rkhunter rkhunter doesn't handle BSDng ports with (null) checksums Date: Thu, 13 Nov 2025 18:35:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pirzyk@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name 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=3D291001 Bug ID: 291001 Summary: security/rkhunter rkhunter doesn't handle BSDng ports with (null) checksums Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: pirzyk@FreeBSD.org CC: lukasz@wasikowski.net CC: lukasz@wasikowski.net Flags: maintainer-feedback?(lukasz@wasikowski.net) Created attachment 265399 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D265399&action= =3Dedit Proposed patch The latest version of pkg (2.4.2_1) on FreeBSD 14.3-RELEASE-p5 does not have any valid checksums. rkhunter runs the following command to extract checks= ums from the port and installs them into its own DB. pkg query '%Fp: %Fs' $PORT | grep ${FNAME}: | sed -r -e 's/^.*: (1\$)?([A-Fa-f0-9]+)$/\2/' When running this command against pkg, we get this result (see attachment f= or full output of the pkg query command): /usr/local/sbin/pkg: (null) But the correctly formatted output should be something like this (used for = the rkhunter pkg itself): pkg query '%Fp: %Fs' rkhunter | grep /usr/local/bin/rkhunter: | sed -r -e 's/^.*: (1\$)?([A-Fa-f0-9]+)$/\2/'=20 251d41356add11649268be142b8c831234be1620b7ed97cf78d76f52dec07d2e The resulting error causes an off by one error when running rkhunter in che= ck mode (as usually done through periodic/security): Running rkhunter... Warning: Package manager verification has failed: File: /usr/local/sbin/pkg The file hash value has changed Warning: The file properties have changed: File: /usr/local/sbin/pkg Current permissions: 0755 Stored permissions: 167465 Current uid: 0 Stored uid: 0755 Current inode: 167465 Stored inode: (null) Current size: 3870032 Stored size: 0 Current file modification time: 1762391141 (5-Nov-2025 19:05:41) Stored file modification time : 3870032 (14-Feb-1970 13:00:32) Note the size is zero (really uid), stored permissions look like the inode, etc. Also attached is a proposed patch to ignore the (null) and have rkhunter ju= st use the /sbin/sha256 (default hash program) to recalculate the value. Since the main rkhunter script (/usr/local/bin/rkhunter) already gets patched, th= is change needs to be included into the existing patch file. --=20 You are receiving this mail because: You are the assignee for the bug.=