提交 8028b573 编写于 作者: G Guillaume Nault 提交者: Dmitry Kozlov

ppp: fix use-after-free in ppp_auth_failed()

The 'username' variable can be freed at the beginning of the function.
We have to use ppp->ses.username instead.
Signed-off-by: NGuillaume Nault <g.nault@alphalink.fr>
上级 d0fdab57
......@@ -364,8 +364,8 @@ void __export ppp_auth_failed(struct ppp_t *ppp, char *username)
_free(username);
ppp->ses.terminate_cause = TERM_AUTH_ERROR;
pthread_rwlock_unlock(&ses_lock);
log_ppp_info1("%s: authentication failed\n", username);
log_info1("%s: authentication failed\n", username);
log_ppp_info1("%s: authentication failed\n", ppp->ses.username);
log_info1("%s: authentication failed\n", ppp->ses.username);
triton_event_fire(EV_SES_AUTH_FAILED, ppp);
} else
log_ppp_info1("authentication failed\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册