Summary: | [login.conf] Better Password Hashes | ||
---|---|---|---|
Product: | Base System | Reporter: | A.J. Kehoe IV <n6gXhrf6> |
Component: | conf | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Open --- | ||
Severity: | Affects Only Me | CC: | 482254ac, Jungleboogie0, allanjude, emaste, feld, freebsd, ler, nukama, secteam, shawn.webb, tom, tommi.pernila |
Priority: | Normal | Keywords: | feature, security |
Version: | 10.0-CURRENT | ||
Hardware: | Any | ||
OS: | Any | ||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=75934 | ||
Attachments: |
Description
A.J. Kehoe IV
2013-09-30 18:50:00 UTC
Responsible Changed From-To: freebsd-bugs->secteam Take. Any update on this? The original issue is now nearing 9 years old :-) Created attachment 152839 [details]
Patch against -CURRENT 201502 with a ton of enhancements, see -security
does a few things with the base system:
1. allows modular crypt to be specified as passwd_format in /etc/login.conf
- this allows setting the algorithm *and rounds*, i.e. $2b$10$ for users of varying classes.
- this will allow any future algorithms and parameters supported by crypt(3) to be supported by the tools around login.conf
2. introduces a new api, crypt_makesalt which will generate an appropriate salt for any algorithm selected
3. updates userland to use this API, and removes totally the {crypt_set_format, login_setcryptfmt, login_getcryptfmt} APIs
4. switches crypt algorithms to use thread-local storage, so the good old global crypt buffer is thread-local
5. includes a bunch of new test vectors for libcrypt ATF tests
Created attachment 154251 [details]
Patch against -CURRENT revision 279936 (20150312) with changes discussed on -security.
Created attachment 154265 [details]
Updated patch against -CURRENT revision 279936 (20150312) with changes discussed on -security.
Forgot to add some documentation items. They are included here.
The items specifically mentioned on -security were:
3. updates userland to use this API, and removes totally the {crypt_set_format, login_setcryptfmt, login_getcryptfmt} APIs
4. switches crypt algorithms to use thread-local storage, so the good old global crypt buffer is thread-local
#4 has be backed out. #3 - we've kept the old APIs and updated their documentation.
As discussed at BSDCan, submitted is going to refresh this patch Created attachment 173187 [details]
Refreshed patch, against git/a8ff864 (20160730)
To recap, this patch contains:
- updated libcrypt, which includes crypt_makesalt
- revised/rewritten crypt(3) manpage, detailing the uses of Modular Crypt Formats, and new crypt_makesalt api
- numerous test vectors for libcrypt
- refactored pam_unix to use crypt_makesalt, instead of its own format
- refactored pw to support Modular Crypt Formats in login.conf
This will (hopefully!) lay the groundwork for a login.conf tunable to allow pam_unix to "upgrade" hashes on login to a suitable algorithm.
Again, the same discussion/review that took place on -security is still relevant, this simply brings the patch up to date.
Created attachment 173188 [details]
correct crypt_makesalt return code documentation
Same as 173187: Refreshed patch, against git/a8ff864 (20160730), but corrected return code documentation for crypt_makesalt.
I plan to have a look at this with folks attending BSDCam during the 1st week of August. That's great news. Happy to iterate on this, if the feedback loop is shorter. It has been some years now, and it looks like we are still without a workable solution. Any update? Reset status (In-Progress -> Open) on issues without a real assignee Reset assignee (5 years since assignment). This issue doesn't strictly need to be lead/committed by secteam, and has likely gated progress due to it appearing 'taken'. It will probably need to be at least reviewed if not approved by them however, so keep them CC'd. It would be good to get the changes updated to patch/apply against CURRENT (12.0 today) I'm still here. I'll be at BSDCan again this year. Happy to iterate, but not in isolation. Looking for someone in the project to help see this through so I'm not writing aimless patches. Thanks (In reply to Derek from comment #14) I will also be at BSDCan. Let's see if we can get this *committed* at BSDCan. I will help you find the right people to make this happen. FYI - this is in phabricator now: https://reviews.freebsd.org/D15713 Just checking in on this as the review went up just about a month ago. Any progress? If this is going nowhere, at the very least the hardcoded iteration counts should be reviewed. 5000 iterations of SHA512 and 2^4 of blowfish are hardly reasonable. |