Skip to content
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

Potential buffer overflow in htpasswd.c #17

Open
ThisLimn0 opened this issue Jan 19, 2023 · 0 comments
Open

Potential buffer overflow in htpasswd.c #17

ThisLimn0 opened this issue Jan 19, 2023 · 0 comments

Comments

@ThisLimn0
Copy link

In https://github.com/blueness/sthttpd/blob/master/extras/htpasswd.c#L100 the use of the gets function could pose a security risk as it does not check the size of the buffer that is read in.

This could be mitigated by using fgets(password, sizeof(password), stdin);

Since this is inside of the MPE (the operating system?) check i doubt this is a problem on regular systems. I just noticed while reading the code.

Pretty sure this also affects the root code in the thttpd 2.29 stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant