From nobody Fri May 06 11:25:32 2022 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 3219E1AD7E83 for ; Fri, 6 May 2022 11:25:33 +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 4KvpCK07hVz4r7X for ; Fri, 6 May 2022 11:25:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 D500B1ABF9 for ; Fri, 6 May 2022 11:25:32 +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 246BPWTD071018 for ; Fri, 6 May 2022 11:25:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 246BPWas071017 for ports-bugs@FreeBSD.org; Fri, 6 May 2022 11:25:32 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 263812] security/easy-rsa: grep error prevents issuing of certs Date: Fri, 06 May 2022 11:25:32 +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 Only Me X-Bugzilla-Who: grembo@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: mandree@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 flagtypes.name Message-ID: 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: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651836333; 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=eewtRQxHhqos45CbvkU2Lz4tBjcWrGoQyhUD8yxYStE=; b=dBc5vGRnSoQ7cvnZPXMtbHURyb5VuWzGMC5FqNjZyxKATvWcjHHOdRy5gFisNGOl+V9Htd T5RKP8hWTv3nVbPxmByTJxDewyQ6qE7eXJK7AeVZ9SS6ENejiqnCeRUwSrwBHqGUWYf3BO 4dOBtQlRvDTYcsEj8mzPEonWKVO3pGSBevGnkbillUHgUmowaMb8Y6gIUHRN1L08/Ctw/8 fLxBKsjTOg6EP2i7Y0IvQ82eMWPL7n58FbvejlwYFUn66vn94SqLCQgH6Xk7ej4NR74+1f LPZzQHxpc35NXvq91uGLCrMTfQfBDRHcRshNOLxZAwbeKcomYMb3XqnpOxCgdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651836333; a=rsa-sha256; cv=none; b=tykdk1DX0Mm6w3zQjms3C6LCO73W03G04PWP/FuPxUXJUqwxFtHf2XsgV5NyfPEvlS/xu4 jWDh5HB/9NMnr32DZaM7m/VyqI7ToyIw4ZZed6W288PwPfEPm1AuSLM5cQRSf7VbRQlrwM uuyKICp4VJRuMgc3sRW1VwK+OlX1vECJS7fRLtxVJK6JDLY8MzJgP8MVjjXrthO2RNUeVm 89ajC6SDf0BRr+QhZS5F1dbqazHNHX5maI7XcTJSvtFyx0IBxbqGCmqcrCIh0fWv7Fego2 hhG0kMqDXmwjNvh70ylwgQ5k2Hx41zpbCtLkHmFO24uW8gfmHqsgQqUaTMy/xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263812 Bug ID: 263812 Summary: security/easy-rsa: grep error prevents issuing of certs Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: mandree@FreeBSD.org Reporter: grembo@FreeBSD.org Flags: maintainer-feedback?(mandree@FreeBSD.org) Assignee: mandree@FreeBSD.org When running easyrsa on FreeBSD 13.0, it fails due to bsdgrep (which is installed by default now) not understanding "\d" for digit. So the problematic line is: echo "$cn" | grep -E -q '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$' Which leads to this error: grep: trailing backslash (\) Changing \d to [0-9] fixes the issue (see patch below). I would suggest this order to approach the issue: 1. Patch easy-rsa in the port, so it works again 2. Check if bsdgrep not understanding \d is on purpose 3. Only if it's not, try to upstream the patch above --- /usr/local/share/easy-rsa/easyrsa.real~ 2022-05-06 11:04:57.0000000= 00 +0000 +++ /usr/local/share/easy-rsa/easyrsa.real 2022-05-06 11:10:49.6870100= 00 +0000 @@ -1546,7 +1546,7 @@ easyrsa_openssl req -in "$path" -noout -subject -nameopt sep_multiline | awk -F'=3D' '/^ *CN=3D/{print $2}' ) - echo "$cn" | grep -E -q '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$' + echo "$cn" | grep -E -q '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$' #shellcheck disable=3DSC2181 if [ $? -eq 0 ]; then print "subjectAltName =3D IP:$cn" --=20 You are receiving this mail because: You are the assignee for the bug.=