From nobody Sun Nov 06 14:21:02 2022 X-Original-To: dev-commits-src-all@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 4N4xNv1l2Qz4hJ9F; Sun, 6 Nov 2022 14:21:03 +0000 (UTC) (envelope-from git@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 4N4xNv1FFcz3NqS; Sun, 6 Nov 2022 14:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667744463; 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=cgSaR76d7xFKKWy6ZQgIFXFoM3JFVMLpEfQYznvR5XA=; b=WHsZW9wURU5uUW4V3ub1OfrnB1SDXUykjJ2n814Nbz6+s2FsiTAhE221Pahng75VOHRn3i 2Jek4HSOzcNdsMHBxCCQwaklrs6+9bfaiQrXQMGfTRCKw8MGkdM4ojOwWLONUORbHfab6A pZdcCDa7nReMRKl4zE6lvIe7zD5mGt8rUGo3RpVgd3k5zq9LAr6+Mm1sh15kNctzf7G115 glf2gRRIIoFq5mDFmo53XxzGXuP9m8T1ct9d5gvbMR0n1XwJn6geftWKj1z+ay9Q1xcJKq tW56IcpigUjoiMaNuI06/ZG2Sehdl74U0YqIjZz9fuRUPRLriHR5JaK16gMDhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4N4xNv0KLZzPXS; Sun, 6 Nov 2022 14:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2A6EL2ks080818; Sun, 6 Nov 2022 14:21:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A6EL2B4080817; Sun, 6 Nov 2022 14:21:02 GMT (envelope-from git) Date: Sun, 6 Nov 2022 14:21:02 GMT Message-Id: <202211061421.2A6EL2B4080817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a841c0c240b7 - stable/12 - ssh: correct parse_cert_times case for hex "to" time List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a841c0c240b705d14a5846a28f91501bf89e2bb9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667744463; 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=cgSaR76d7xFKKWy6ZQgIFXFoM3JFVMLpEfQYznvR5XA=; b=pxEN8NbBUO3MD0o99u+b+eDSAaqhzQcq6pii97rQp/1tlyfJ33/focyoRavPrnpbwaCOmG 51k2e8x9aZzpIILArdBWZysN66JgFWrgc5jaSoFJzwYoGEc1uiFOqszJorOLCjDsVaBJHA g5IKEGLFF6OHofBGq+ZdwnNq/M4ZuZtdsbmxMBNIjltjjWxsil+Ptnemiy9zcJHBIAHjFH oRaflrVs3zAbn0hVaf3yQ0oftMOCefkq57ltqQK7naYtKbdH10aWuHHeKSSKqg8v/kzcT3 5fiXsyRslrTeM9sk4WNoGoemzOtOzf7lmVIP0qFNvHdbASMBv527vmSrh8pIfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667744463; a=rsa-sha256; cv=none; b=QH3poablxAy13MpMN2S+ICSUsVb3nY/XRQ6OA1DkiyIpV5/I51G9PaNsqDtLgW7s707DZI I9hCXGWIsOgGi/k/DRhaBszGqiBlqm54ViuDyAZ0VDNiI6woq5aWSgskEa/F09+uKA1E5e OYLadaN0sXL07+O9CFVJaS6Be6FWH7ENF+8ZUMaVTTYvXvucnydC/BHolKbEVq2rU73Lj8 F8BVEwrgcUJ9dSWXRB7SXYbxw6UMw6zG6Q6zxtsEgdjNPuU9I5Ku75jnvOGnASVz6Zu2fv wzIvYkUrLpXsFlcH/FmjmSHKv7D9MxEr57PYXEfYp/ADqsIZry9AnhMLEMeiXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a841c0c240b705d14a5846a28f91501bf89e2bb9 commit a841c0c240b705d14a5846a28f91501bf89e2bb9 Author: Ed Maste AuthorDate: 2022-11-03 13:44:52 +0000 Commit: Ed Maste CommitDate: 2022-11-06 14:20:04 +0000 ssh: correct parse_cert_times case for hex "to" time This appeared to be a copy-paste error from the "from" time case above. Reported by: Coverity Scan CID: 1500407 Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37252 (cherry picked from commit 0657b2325df3d85967870a928d58b24ffcf3f1ea) (cherry picked from commit 4718d86b3b1aac3f58c19fce34932fd88486af94) --- crypto/openssh/ssh-keygen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/openssh/ssh-keygen.c b/crypto/openssh/ssh-keygen.c index 9b2beda05f0c..1255957d0e67 100644 --- a/crypto/openssh/ssh-keygen.c +++ b/crypto/openssh/ssh-keygen.c @@ -1975,7 +1975,7 @@ parse_cert_times(char *timespec) cert_valid_to = parse_relative_time(to, now); else if (strcmp(to, "forever") == 0) cert_valid_to = ~(u_int64_t)0; - else if (strncmp(from, "0x", 2) == 0) + else if (strncmp(to, "0x", 2) == 0) parse_hex_u64(to, &cert_valid_to); else if (parse_absolute_time(to, &cert_valid_to) != 0) fatal("Invalid to time \"%s\"", to);