-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libnss_tcb: Disallow potentially-malicious user names in getspnam(3). #30
libnss_tcb: Disallow potentially-malicious user names in getspnam(3). #30
Conversation
2d5c00b
to
c685e25
Compare
@ldv-alt This should be an easy one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you've spotted something we really ought to fix, but the code needs further revision.
I don't recall exactly why we didn't have this sort of checks before. It's weird we allowed even ../something
. I suppose we expect(ed) that programs would normally use getpwnam
first and only proceed to getspnam
for existing usernames.
9dfddfc
to
e68b446
Compare
@solardiz, rebased onto main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks correct to me now
IEEE Std 1003.1-2001 allows only the following characters to appear in group- and usernames: letters, digits, underscores, periods, <at>-signs (@), and dashes. The name may not start with a dash or an "@" sign. The "$" sign is allowed at the end of usernames to allow typical Samba machine accounts. Signed-off-by: Björn Esser <[email protected]>
e68b446
to
30116b9
Compare
No description provided.