From nobody Tue Oct 25 00:36:23 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 4MxCfv3N9Qz4g3Kf; Tue, 25 Oct 2022 00:36:23 +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 4MxCfv2Lv0z3Pgt; Tue, 25 Oct 2022 00:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666658183; 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=RBOaSsYXjbOdgH+OVyn5bG8EtUpJNvr2UjIn+IRSvdA=; b=vs1c8RH30TB3EHfdzp7lLAhVjQEFObgXWJ4gB4W3eK/cd/ug3kY4Fso22yJ5IqK8cU0l2N unrK4EhRwnRrjQThrXB8PFk791XavmLeCYLklSDfZ20pOmydZIS/sBRQrS04ZYicjiW3iJ Gn4eDY+WDSifmyBgj8IcvcxtmPnxmLaOHeY1RQwwVToWPfKRIb36ManDcxTHB/7Nx5bTIJ 7hRe4wiBcxy+PmucZ2qkBhqmjA+JsLS0yCvZRZ0cgLtgQLQ/xjvCTmHY5/8IqkqtYX4mk7 Ii8rqlxHvnZzYxDfvnKqJ7+F24SZ9WW0RfWaVe9n9v+68tWfe5+SkxBRLEYngA== 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 4MxCfv1QVWzQ5X; Tue, 25 Oct 2022 00:36:23 +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 29P0aN3K060573; Tue, 25 Oct 2022 00:36:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29P0aNLr060572; Tue, 25 Oct 2022 00:36:23 GMT (envelope-from git) Date: Tue, 25 Oct 2022 00:36:23 GMT Message-Id: <202210250036.29P0aNLr060572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: fd6dd33dc087 - main - opencrypto: fix null esp crypt 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd6dd33dc08772fd8a19ec5674bcfb783d18938a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666658183; 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=RBOaSsYXjbOdgH+OVyn5bG8EtUpJNvr2UjIn+IRSvdA=; b=l/LjK7ZLR/Kc/YStuRzpI+nyh3Y7JkAmJZWjNOaqHFOX5MQczxkR7pnvUs/GAKBQ65MZNi 0MAp33c1m4CXeN/hPxcfaNNoRFdedYI/5mNGCnrDssVvxDLGTHh9ic+0cWOChkuc07/pIr CzfPXd6adFgg8zfVfIdFsyzf/VxNrSABAIZvsSRKwkHhW7PN5qzG7iKIgmQibABl4WUvAk S8mb36jIqMy1EALYo7w2obamJNPtzDLukACJ3dm/kSM9ODx2Xr/ZSvStHjffKd15ln2nmH 8hKM6PkgYdy2gLTTrRsL3XClJRshN70KSSKqV3OmFWAJIzXulJr7BBv+0uLrPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666658183; a=rsa-sha256; cv=none; b=lyOQ4sMtXr4BMrhegMIF4btVO/sUBb1gZ/bpbEgESPE+MPNuDzV8QTbKwugC9VTnEej23h /KQw52CALqU7wy473wZ3v8AurGB+VyijzMQX/DSao1kEpY+q27FNVXGt6ZbR3Q7n1tO2Cv c73531g+iYN1Kn0ra2WwHPUudq/QnNEkvJw5NCPAoDOXX5Zj4tFC4jKoCyFE7lTss/5Rnz Zm9cvEag1AicYiVpsiD1ZqrFQs1v+aXGMRnmHHT5GUTviLW/qtgdCD+VIx5kH9aWlIJaqN RZdyK/9rOfy9ylLXXioA9df12QRMNrszidom6v97WL7/bF3xe4K0gbAbQm7Gqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fd6dd33dc08772fd8a19ec5674bcfb783d18938a commit fd6dd33dc08772fd8a19ec5674bcfb783d18938a Author: Konstantin Belousov AuthorDate: 2022-10-24 23:02:58 +0000 Commit: Konstantin Belousov CommitDate: 2022-10-25 00:24:43 +0000 opencrypto: fix null esp crypt Fixes: 3e9470482a1357eef90d007b27ec5d9725ae1111 Reviewed by: jhb Sponsored by: Nvidia networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37113 --- sys/opencrypto/xform_null.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/opencrypto/xform_null.c b/sys/opencrypto/xform_null.c index 160e1d867792..e8741cbe6366 100644 --- a/sys/opencrypto/xform_null.c +++ b/sys/opencrypto/xform_null.c @@ -99,11 +99,15 @@ const struct auth_hash auth_hash_null = { static void null_crypt(void *key, const uint8_t *in, uint8_t *out) { + if (in != out) + memcpy(out, in, NULL_BLOCK_LEN); } static void null_crypt_multi(void *key, const uint8_t *in, uint8_t *out, size_t len) { + if (in != out) + memcpy(out, in, len); } static int @@ -129,7 +133,7 @@ null_reinit(void *ctx, const uint8_t *buf, u_int len) static int null_update(void *ctx, const void *buf, u_int len) { - return 0; + return (0); } static void