From nobody Tue Jan 02 22:15:54 2024 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 4T4Ry31Txtz55yQc for ; Tue, 2 Jan 2024 22:15:55 +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 4T4Ry26j0pz3KHc for ; Tue, 2 Jan 2024 22:15:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704233754; a=rsa-sha256; cv=none; b=NUKGpOIyrbeIxquTWQNwF4GgS2kjSDRYFcSqz0bJH9LF+M3XsztT6lkDpNScudstsEx5M7 NgIEV70CXdmUG+CmlGiC6XmRBwwyeJvcYXzsoCgNqPMXdVb7fLPUzrqngepZ3eeDL5txGg Su407mEsmVXUSEDmC7YdTHKUyo388q+H17yVW3/2d98dr86qNsuzXNPiGXOTf41/QDHzc1 CYwa5FBGY3QDcBLmIS0tdjA42w3ZHDkrn912PW0vGV9Oa3a7Or7mLp7yh+G8CG3ZrlccMj lyQNnlfCaeYqFDMnVTEcsef0gwFsircyZMuFTXr7yuK0lX3WiSRrML+xbgnpSw== 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=1704233754; 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: in-reply-to:in-reply-to:references:references; bh=2gSg73jxPM9lFpGQhhVOEqCkk1TaoGThHaPWyt0v7bU=; b=hRXIzvabJewf5kAo+urRQu/J+j6tR7G27I1L+8XjzXRmW/KcvT4Ot6Mu1ODTsaRiRzxsHw wnGcxSn0P1n2nFDyWwAACSuDHu36PFXD3+NvE3cnxA5dXG9DeKvw6z4YphAHxgNXhPH1XF LSHlptbA08wTqFOfheBmhynDeXghmUBKe/HVqSiEkT2dq7mC3IaVTaWbIkJ0sYLWPfp/I9 GW8jAb2mJ8niOJp2s3aRlPNwxEzySNtPDVty4W8h4QkQjEkHJUSiQ0ocq42Y3BspgdJBMU y751Lefv0lk2vjyg/LzJb/Sb+XguJ86yL5uTELuuqXd5BVaVT/6gmfgIaEI4HA== 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 4T4Ry25glvz1J52 for ; Tue, 2 Jan 2024 22:15:54 +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 402MFsMG057231 for ; Tue, 2 Jan 2024 22:15:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 402MFssa057230 for bugs@FreeBSD.org; Tue, 2 Jan 2024 22:15:54 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 276043] md5(1) et al are broken when reading the last argument because of capsicum(4) code Date: Tue, 02 Jan 2024 22:15:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rbranco@suse.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D276043 --- Comment #5 from Ricardo Branco --- (In reply to Ricardo Branco from comment #4) wc(1) also fails because of capsicum as this patch is not enough: ``` - if (S_ISREG(sb.st_mode)) { + /* Don't do it on pseudo-filesystems that advertize a zero = size */ + if (S_ISREG(sb.st_mode) && sb.st_size > 0) { ``` It now returns the result of a truncated read: ``` $ /usr/obj/usr/src/amd64.amd64/usr.bin/wc/wc -m /compat/linux/proc/cpuinfo= =20 3549 /compat/linux/proc/cpuinfo ``` --=20 You are receiving this mail because: You are the assignee for the bug.=