mirror of
https://github.com/clearml/dropbear
synced 2025-04-08 06:34:23 +00:00
Avoid segfault for locked accounts (invalid salt to crypt())
This commit is contained in:
parent
3ea9068e18
commit
57166b400c
@ -66,6 +66,14 @@ void svr_auth_password() {
|
||||
m_burn(password, passwordlen);
|
||||
m_free(password);
|
||||
|
||||
if (testcrypt == NULL) {
|
||||
/* crypt() with an invalid salt like "!!" */
|
||||
dropbear_log(LOG_WARNING, "User account '%s' is locked",
|
||||
ses.authstate.pw_name);
|
||||
send_msg_userauth_failure(0, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
/* check for empty password */
|
||||
if (passwdcrypt[0] == '\0') {
|
||||
dropbear_log(LOG_WARNING, "User '%s' has blank password, rejected",
|
||||
|
Loading…
Reference in New Issue
Block a user