From nobody Thu Jan 18 17:29:47 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 4TG8rm4RcQz56YKw for ; Thu, 18 Jan 2024 17:30:00 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TG8rl6dRtz45c4 for ; Thu, 18 Jan 2024 17:29:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-40e8ddebc71so12258425e9.2 for ; Thu, 18 Jan 2024 09:29:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705598998; x=1706203798; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n5mn9Py63NDz24w75NWG/mdC75eDLN6f9uuk4m+yX8A=; b=ptUsiFgwd2ZDALBzl/Lr0IXusXGCwUn5YFaQJkM93TAHPO7s3EIIPPJVKGLQuysruC FwcY00fmDiWkGuN2b/Y03z/5IavAEcjwsIw6F6emBXeZxALLyfxGNJdkE6vqVHowM302 g79c9J39DmcxIIOCBgtFs4aJnzLQx5mvR1jF3KGEQWIjysX/gzehOHw+ehvjdYZmV859 jZe0wpWGzamGn1uNYwyl/jE12bGNA4SITe61CHWBmbEau+LYT0sRm9XQ+IWn0CUkcZed DTeAunOFaGW6CtcMX/lXMx8gxS+KBpXGikTk0rnOhzaIxOJs9aAuKh+HbxPKyYV8gkD/ /odQ== X-Gm-Message-State: AOJu0YyuJtZJ+dTS6ZWkI8frbpDse3I/O6ZxWUjU6rOVkhB5BO/El309 aYPRIERKXFoauLrcDGWle5PsSbjdp39eRG1Xs6thhb7OykeWWU+rSbBRQnzg9wY= X-Google-Smtp-Source: AGHT+IEhuDUfbGjcTM8YB7QuTP2GUV4nIcYftej46Mk/66ZDIIrECwVFzsWu2cRftyuGR5BBPueHNg== X-Received: by 2002:a1c:7415:0:b0:40e:4eed:da7a with SMTP id p21-20020a1c7415000000b0040e4eedda7amr841068wmc.68.1705598998387; Thu, 18 Jan 2024 09:29:58 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id u17-20020a05600c19d100b0040e47dc2e8fsm26361491wmq.6.2024.01.18.09.29.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jan 2024 09:29:58 -0800 (PST) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: 0990136ed175 - main - kerberos5: Mitigate the possibility of using an old libcrypto From: Jessica Clarke In-Reply-To: <202401181523.40IFNvXI077592@gitrepo.freebsd.org> Date: Thu, 18 Jan 2024 17:29:47 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202401181523.40IFNvXI077592@gitrepo.freebsd.org> To: Cy Schubert X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TG8rl6dRtz45c4 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 18 Jan 2024, at 15:23, Cy Schubert wrote: >=20 > The branch main has been updated by cy: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D0990136ed1753ac7837206f9c5f4b83c= cff6c405 >=20 > commit 0990136ed1753ac7837206f9c5f4b83ccff6c405 > Author: Cy Schubert > AuthorDate: 2024-01-18 08:22:20 +0000 > Commit: Cy Schubert > CommitDate: 2024-01-18 15:12:14 +0000 >=20 > kerberos5: Mitigate the possibility of using an old libcrypto >=20 > By using the full library name (libcrypto.so.30) we avoid the = exposure > of using an old, possibly vulnerable, library. >=20 > 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(-) >=20 > 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 >=20 > #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >=3D 3) > +#define CRYPTO_LIBRARY "/lib/libcrypto.so.30" This still assumes the native ABI is in use, i.e. doesn=E2=80=99t = account for libcompat. Can we please just drop the directory, or if it=E2=80=99s = really needed for some reason at least handle the libcompat case? Jess > 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 >=3D 3) > if (crypto_lib_handle =3D=3D NULL) { > - if (!(crypto_lib_handle =3D dlopen("/usr/lib/libcrypto.so", > + if (!(crypto_lib_handle =3D dlopen(CRYPTO_LIBRARY, > RTLD_LAZY|RTLD_GLOBAL))) { > print_dlerror("Unable to load libcrypto.so"); > return (EINVAL);