mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 2/5] security: mark weaker passwords hashing algorithms insecure
Date: Wed,  6 Aug 2025 16:00:02 +0200	[thread overview]
Message-ID: <20250806140005.2866622-2-a.fatoum@barebox.org> (raw)
In-Reply-To: <20250806140005.2866622-1-a.fatoum@barebox.org>

It's well known that MD5 and SHA1 aren't suitable password hashing
algorithms. Let's alert users to that fact by selecting
HAS_INSECURE_DEFAULTS.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 security/Kconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/security/Kconfig b/security/Kconfig
index 88ebdeed2f64..3e21e1416e2f 100644
--- a/security/Kconfig
+++ b/security/Kconfig
@@ -63,10 +63,21 @@ choice
 config PASSWD_SUM_MD5
 	bool "MD5"
 	select DIGEST_MD5_GENERIC
+	select HAS_INSECURE_DEFAULTS
+	help
+	  MD5 had been widely used historically as a cryptographic hash function,
+	  but has been found to suffer from extensive vulnerabilities.
+	  Use of MD5 to hash passwords is strongly discouraged.
 
 config PASSWD_SUM_SHA1
 	bool "SHA1"
 	select DIGEST_SHA1_GENERIC
+	select HAS_INSECURE_DEFAULTS
+	help
+	  SHA1 had been widely used historically as a cryptographic hash function,
+	  but has since been cryptographically broken.
+	  SHA-1 was designed for speed and thus use as password hash is strongly
+	  discouraged as it's easier for an attacker to brute force.
 
 config PASSWD_SUM_SHA256
 	bool "SHA256"
-- 
2.39.5




  reply	other threads:[~2025-08-06 14:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06 14:00 [PATCH 1/5] security: add new top-level menu Ahmad Fatoum
2025-08-06 14:00 ` Ahmad Fatoum [this message]
2025-08-06 14:00 ` [PATCH 3/5] commands: introduce new security command group Ahmad Fatoum
2025-08-06 14:00 ` [PATCH 4/5] security: password: make PBKDF2 the default instead of MD5 Ahmad Fatoum
2025-08-06 14:00 ` [PATCH 5/5] commands: move login/passwd into security section Ahmad Fatoum
2025-08-07  6:26 ` [PATCH] fixup! security: add new top-level menu Ahmad Fatoum
2025-08-07  7:34 ` [PATCH 1/5] " Sascha Hauer
2025-08-07  8:11   ` Ahmad Fatoum

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=20250806140005.2866622-2-a.fatoum@barebox.org \
    --to=a.fatoum@barebox.org \
    --cc=barebox@lists.infradead.org \
    /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