|
|
Message-ID: <332ba220-4d51-b554-49a4-9d99aaa9cd28@mirbsd.de>
Date: Fri, 6 Nov 2026 23:14:14 +0100 (CET)
From: Thorsten Glaser <tg@...bsd.de>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] [RFC] Harden against misuse of crypt
On Fri, 6 Nov 2026, Rich Felker wrote:
>In any case, I put the "*1" code path in there in case anything ever
>changes with how we handle DES, to be sure crypt(pass,"*0") can never
>return "*0".
Something like this is necessary, as I’ve seen in older OpenSSH
where it just passed "xx" as seed if it was shorter.
FWIW I went with the equivalent of…
(setting[0] == 'x') ? "**" : "x*";
… in MirBSD yesternight, but it does now check the DES chars,
so it’ll refuse "**" and "x*" as invalid seeds now, with the
respective other returned.
None of this fixes the OpenSSH bug (if a master.passwd(5) or
shadow(5) entry has any of these values in the field), but it
should be some defence-in-depth.
But this gives some options as base for discussion: both the
return values and whether DES should accept them (I’d probably
argue that not, because that will return longer strings, which,
should they ever end up in passwd/shadow, will pass OpenSSH’s
new four-bytes-minimum string, so I’d rather the fallback strings
be invalid for new hashing).
bye,
//mirabilos
--
> emacs als auch vi zum Kotzen finde (joe rules) und pine für den einzig
> bedienbaren textmode-mailclient halte (und ich hab sie alle ausprobiert). ;)
Hallooooo, ich bin der Holger ("Hallo Holger!"), und ich bin ebenfalls
... pine-User, und das auch noch gewohnheitsmäßig ("Oooooooohhh"). [aus dasr]
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.