Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Peter Korsgaard <peter@korsgaard.com>
Cc: Jimmy Durand Wesolowski via buildroot <buildroot@buildroot.org>,
	 romain.naour@smile.fr,
	Jimmy Durand Wesolowski <jimmy.wesolowski@mobileye.com>,
	guenther.harrasser@mobileye.com
Subject: Re: [Buildroot] [PATCH] package/openssh: enable DES when using libopenssl
Date: Fri, 21 Aug 2026 14:38:26 +0200	[thread overview]
Message-ID: <aohFF1WM2HaL7WU9@windsurf> (raw)
In-Reply-To: <87qzkmq21f.fsf@dell.be.48ers.dk>

Hello Jimmy, Hello Peter,

On Tue, Jul 28, 2026 at 10:42:20PM +0200, Peter Korsgaard wrote:

>  > Signed-off-by: Jimmy Durand Wesolowski <jimmy.wesolowski@mobileye.com>
> 
> Hmm, with what configuration is this? Presumably not one where
> BR2_PACKAGE_OPENSSH_SERVER is enabled, as that pulls in libxcrypt on
> glibc?

Issue can be reproduced with:

  BR2_aarch64=y
  BR2_TOOLCHAIN_EXTERNAL=y
  BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
  BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
  BR2_INIT_NONE=y
  BR2_SYSTEM_BIN_SH_NONE=y
  # BR2_PACKAGE_BUSYBOX is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHA is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2 is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4 is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_MD2 is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4 is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_MDC2 is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_BLAKE2 is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_IDEA is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_SEED is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_DES is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160 is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_WHIRLPOOL is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL3 is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_WEAK_SSL is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_CAST is not set
  # BR2_PACKAGE_LIBOPENSSL_UNSECURE is not set
  # BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINE is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_COMP is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_ARGON2 is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_CACHED_FETCH is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_CMP is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_THREAD_POOL is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_ECX is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_PADLOCK_ENGINE is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_MODULE is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_QUIC is not set
  # BR2_PACKAGE_LIBOPENSSL_SECURE_MEMORY is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_SIV is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_SM2_PRECOMP_TABLE is not set
  # BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL_TRACE is not set
  BR2_PACKAGE_OPENSSH=y
  # BR2_PACKAGE_OPENSSH_SERVER is not set
  # BR2_PACKAGE_OPENSSH_KEY_UTILS is not set
  # BR2_PACKAGE_OPENSSH_SANDBOX is not set
  # BR2_TARGET_ROOTFS_TAR is not set

So basically, OpenSSH enabled, client only (since enabling the server
would pull in libxcrypt) and disabling all OpenSSL sub-options.

The code in OpenSSH goes like this:

# if defined(WITH_OPENSSL) && !defined(HAVE_CRYPT) && defined(HAVE_DES_CRYPT)
#  include <openssl/des.h>
#  define crypt DES_crypt
# endif

So basically, the idea is that if we have OpenSSL, we don't have
crypt(), but we have DES_crypt, then we use DES_crypt() as
crypt(). Otherwise, the crypt() call in the OpenSSH xcrypt() function
remains crypt(), and things blow up when you're building with glibc
and you don't have libxcrypt around to provide crypt().

So indeed, we have two options here:

- Always provide a crypt() implementation by making libxcrypt
  mandatory for OpenSSH as a whole, not just for the server-side

- Require OpenSSH to provide DES support, which is what Jimmy was
  proposing.

I honestly don't have a strong argument. My vague feeling is that DES
being obsolete, it feels odd to be forced to enable it. Though perhaps
libxcrypt would in fact provide exactly the same obsolete crypto
algorithm?

Peter: thoughts?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-08-21 12:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 10:07 [Buildroot] [PATCH] package/openssh: enable DES when using libopenssl Jimmy Durand Wesolowski via buildroot
2026-07-28 20:42 ` Peter Korsgaard
2026-08-21 12:38   ` Thomas Petazzoni via buildroot [this message]
2026-08-21 14:44     ` Peter Korsgaard
2026-08-31 16:09 ` [Buildroot] [PATCH] openssh: ensure libxcrypt is enabled to provide a crypt() implementation Jimmy Durand Wesolowski via buildroot
2026-08-31 19:10   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aohFF1WM2HaL7WU9@windsurf \
    --to=buildroot@buildroot.org \
    --cc=guenther.harrasser@mobileye.com \
    --cc=jimmy.wesolowski@mobileye.com \
    --cc=peter@korsgaard.com \
    --cc=romain.naour@smile.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox