From nobody Mon Jan 22 15:49:25 2024 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 4TJZQt35wDz57fYd; Mon, 22 Jan 2024 15:49:26 +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 4TJZQt1LKlz4NZb; Mon, 22 Jan 2024 15:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705938566; 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=p4Pw4RC+95vPEvHO014EYye/ZBB/kWc9G1ojDwbJ+Fw=; b=q/dizOBySRoRCnZrsjpII345Rq3bRhEcXSr8McQAqE4sKiJit666amA2SEM7BeTQNPqTvR S08nizPCccS4gP6JCtX8ZBxuX1XThkYmxPqCUxUIb0z1B9e2vh6f5H2MjK15qPlMvoa4iy 31ij4EQbNOK5TNmbUSV+q7Y0I4FW7//uLXw1tH+em5HmkjT+PhIupUv1Jr3hsSqqGgjPX6 Oca8I50dpQ3ZSj7ve1vJmUDzup1JA5W2VYTHxT/5+1CFlemx5jKseQ2G2VjppQetqunGz1 g8OUBWvOFyuge1BtNNWoenBwRrJSs/5L+eVfI41ruEA+29LNefGWuVtg/9c1DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705938566; 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=p4Pw4RC+95vPEvHO014EYye/ZBB/kWc9G1ojDwbJ+Fw=; b=SGKHDGfCAqSM1TWGIMeLt5+8sm48D6oHXqBC1JOSbjz9Bvp9LCpGwRM/5B2bdZrAzSr5qA RTlJxDFdLZpSUjk1jkmo8oIGnUa+W87UMmcyWA+tv56mweGS/mcsy1b+ANq99VQfvgqrve nMdWRi6sbae9p/DSfZAfHRvW/f8wil+z3D+n0b89ee1IrMZCwzX/ZvWGnlS2DF85azEcAC JWPgF9FvXUVYnvRwldxHt+q/dBQZ5RS6VbGa01aOHCBl7jrW696++hSR41hVirJHzIGwc6 M17LCL+Xio7yNG+3q08cpVaW9h+NRzrfec4l9TqSuGGkWaXrXSb0EltPNtKUwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705938566; a=rsa-sha256; cv=none; b=pNgnvaRchdx3sstQccgHFqTWrF9vEroqF0FKcEqXvMrMtzFcCynC7zwRnsFxvYvL2Cn3Iu g0sC/5mUSr5xAYavHwiDl9DFFtum5pJEP/XpJ5JYnKlnZdZxHmCZ6CsBl1bkeIYryTMT3D Mgvwo3P0ZJrFhVkFkZhkFUhHP0JcdWL1Ldn1RSLEZMxnGRsDe2HI4O/DrMMRzzFib6TRRW GGf5GoqUuIN4pSX9HDSHmkwfk7XFK3eDfkFvkqGqxozYSKQ1BhcWBWJd7sqtgmkXtw2JWk vEmpt6ea71dI/RB6C98fiveAbk+qWFR9c5h/JfkfuPXAQ06JAMDxeCCP3qPfnA== 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 4TJZQt0QhNz16my; Mon, 22 Jan 2024 15:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40MFnPTO035039; Mon, 22 Jan 2024 15:49:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40MFnPYF035036; Mon, 22 Jan 2024 15:49:25 GMT (envelope-from git) Date: Mon, 22 Jan 2024 15:49:25 GMT Message-Id: <202401221549.40MFnPYF035036@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 17e941a0c88c - stable/14 - kerberos5: Mitigate the possibility of using an old libcrypto 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 17e941a0c88cac2d8cd28d6614448adbd65d4b72 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=17e941a0c88cac2d8cd28d6614448adbd65d4b72 commit 17e941a0c88cac2d8cd28d6614448adbd65d4b72 Author: Cy Schubert AuthorDate: 2024-01-18 08:22:20 +0000 Commit: Cy Schubert CommitDate: 2024-01-22 15:49:05 +0000 kerberos5: Mitigate the possibility of using an old libcrypto By using the full library name (libcrypto.so.30) we avoid the exposure of using an old, possibly vulnerable, library. Reported by: jrtc27 Fixes: 476d63e091c2 (cherry picked from commit 0990136ed1753ac7837206f9c5f4b83ccff6c405) --- kerberos5/lib/libroken/fbsd_ossl_provider_load.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c index 497b32124f96..2328041bc166 100644 --- a/kerberos5/lib/libroken/fbsd_ossl_provider_load.c +++ b/kerberos5/lib/libroken/fbsd_ossl_provider_load.c @@ -5,6 +5,7 @@ #include #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) +#define CRYPTO_LIBRARY "/lib/libcrypto.so.30" static void fbsd_ossl_provider_unload(void); static void print_dlerror(char *); static OSSL_PROVIDER *legacy; @@ -46,7 +47,7 @@ fbsd_ossl_provider_load(void) { #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) if (crypto_lib_handle == NULL) { - if (!(crypto_lib_handle = dlopen("/usr/lib/libcrypto.so", + if (!(crypto_lib_handle = dlopen(CRYPTO_LIBRARY, RTLD_LAZY|RTLD_GLOBAL))) { print_dlerror("Unable to load libcrypto.so"); return (EINVAL);