From nobody Thu Jan 18 15:23:57 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 4TG63K6GNzz58Vw2; Thu, 18 Jan 2024 15:23:57 +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 4TG63K5d5Hz4lBx; Thu, 18 Jan 2024 15:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705591437; 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=E0amQI7BRhnvDVmcrpgn0IO0xfPb55fj88VQnlU0WQo=; b=OhGLB0w8AqMyP6Dx1ogyofjzIebLeSSpwuoMGMoLXV7HJ0v/SwD/9hovgWG88PleHiR7Ag mT1yMa36tAJ/Z81aYc1r8xKsVfofcNmS8CuGKxP+COrCRRBn4oIO1Je9LHV95VnZRxPi9K vk9B6sEjxudZuE6TxizZh6EMu+Uuk+LTIukAOzRg7UzRHtPVjDH7ZWvnkULksR0u1iz12i 2tsEurtt9LshbUSKNnU+hrGigvHh8MYMGQ/OmaYAPVQx2GEbfUY26hSudeMGizA/+MjLdH 9Soz0CaBySHGhruEagWsNKXLQsb2KMaJstv8b2jpdbCpAuNznzdxgN+47mCG3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705591437; 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=E0amQI7BRhnvDVmcrpgn0IO0xfPb55fj88VQnlU0WQo=; b=si7/QT2Y6vrWYVwBkmJwiJ3w7iQteQkAYiAbdMaH1iSqV49QSf84WrnMgd69dO0KB9dKk7 vw2ecdB2ZJiy2GJJom3j1W77BpO/gX+tbuagT2cJMtJsP/DiH1vA0v2MfAxhi5ZuZiTQkk e3JUEeJAcMImGEWf9DSgPFv1JgIOC9gcINkAkqDCpDZFtUwgi0IUScMOT5775aYaYACCMR PUGzhYlUVCb4x8wiy3+hRdr3UrJ182in5GhhfqSa4DEukCYmrag2WHLzulfWBWmGPXXTRw nWn75LLEz+/lTlEcGPuAwxWQAGtGrsHseUOLoCy32kMS14XUBXMGrgmZn8tbQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705591437; a=rsa-sha256; cv=none; b=HC7H6ypHsK24Il+O1XAzqG7tsdGP+SahDWCVGSjaxtsGFxLIwyymhJz3ed7Cy5cytiAuqc Hw0ed5ZsWf1oRl8w214PDh8KGaEMX5p2G3J74KezwFjYBjjhxVfZl84SbupVX2JCxWFSr7 UbMNHAG5IVxYnvho03BioQ8Ex4gNAEkpaMdcu1N+xILcMDUT3aluMVifTgubiHszS5TEIk PYErSrF3KeP+sDMtJhHGlI5w/7unK/Mzbp29Ui6iuQLkARnelwULRm6cB2I1JbN3GaEJjj 44jdCqp8pekUyy5A4qyZsN8Q6dlH58PXsH85CLX/Ljafk0Cc2AFMha3Syri6bA== 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 4TG63K4gdHz1BTx; Thu, 18 Jan 2024 15:23:57 +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 40IFNvrw077595; Thu, 18 Jan 2024 15:23:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IFNvXI077592; Thu, 18 Jan 2024 15:23:57 GMT (envelope-from git) Date: Thu, 18 Jan 2024 15:23:57 GMT Message-Id: <202401181523.40IFNvXI077592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 0990136ed175 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 0990136ed1753ac7837206f9c5f4b83ccff6c405 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=0990136ed1753ac7837206f9c5f4b83ccff6c405 commit 0990136ed1753ac7837206f9c5f4b83ccff6c405 Author: Cy Schubert AuthorDate: 2024-01-18 08:22:20 +0000 Commit: Cy Schubert CommitDate: 2024-01-18 15:12:14 +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 MFC after: 3 days X-MFC with: 476d63e091c2 Fixes: 476d63e091c2 --- 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);