[feature] Add securemode, verifySIDPassword#408
Open
hMcLauchlan wants to merge 3 commits intoDrive-Trust-Alliance:masterfrom
Open
[feature] Add securemode, verifySIDPassword#408hMcLauchlan wants to merge 3 commits intoDrive-Trust-Alliance:masterfrom
hMcLauchlan wants to merge 3 commits intoDrive-Trust-Alliance:masterfrom
Conversation
added 3 commits
August 16, 2022 22:40
Moving GetPassPhrase.o down into SEDUTIL_LINUX_CODE, since we need it for the securemode/password-setting work. This is fine since AFAICT linuxpba_SOURCES eventually gets consumed in conjunction with SEDUTIL_LINUX_CODE, so that binary will get access to the TU. Keeping this as seperate commit since it might be a little bit subtle / weird, depending on what Make is doing behind the scenes. Signed-off-by: Howard McLauchlan <hmclauchlan@fb.com>
*BASICALLY CLEANED UP VERSION OF Drive-Trust-Alliance#271 This commit does what the linked PR says, and also fixes a few bugs in that original PR. I'm not sure what the right way to give credit is and it was very painful to resurrect CVE's original patches and roll my own on top, so the disclaimer here is that it's like 95% his code :). A few notable things: * We don't need to modify the makefiles, since we split that out in the prior commit. * We fixed his original makefile, which didn't quite work: that change is folded naturally into prior commit. * The generated makefiles don't need to change, because since CVE's original patchset, GetPassPhrase.o was introduced organically to the codebase, and ergo the makefiles. The most interesting thing here is we allow hashing to be forced off by `-n` even during secure mode. The key issue we ran into was that if a drive is originally set with no hashing, then hash'd invocations in the future will fail(obviously). As implemented, CVE's original patches will silently debug output, and then turn on hashing without telling the user. Not a domain expert in why hashing is necessary here, but in either case, I think we should support the case where a password was originally set without hashing, by allowing hashing to be turned off _if_ specified explicitly. We also do some sneaky business by ensuring -n is evaluated after -s, so -n will always override -s, if provided. Signed-off-by: Howard McLauchlan <hmclauchlan@fb.com>
This is a utility I added to aid debugging, but generally seems like a good idea. Before adding this, the only way we had of checking "do i have the right password" was to try to change it, which does seem a little weird. The pattern of change_password -> verify_password seems a little more sane to me. The implementation of this command is a little scuffed though. Under the hood, we attempt to start a session with the passed in password. There are many reasons for a session start to fail, and verifySIDPassword faithfully returns them. On success, however, the password must be correct. Signed-off-by: Howard McLauchlan <hmclauchlan@fb.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
Thank you for working on this utility. Please find in this PR some patches which we've carried on top of master to enable our use cases (particularly around setting passwords on SEDs). They should be generic enough to be mainline'd, but I'm happy to make changes as appropriate.
This PR does two main things:
Please see commit messages for more details. Thanks!
Edit: Forgot to post my test plan: