summaryrefslogtreecommitdiff
path: root/accel-pppd/auth/auth_mschap_v2.c
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@mail.ru>2020-08-02 19:09:13 +0500
committerVladislav Grishenko <themiron@mail.ru>2020-08-02 19:09:13 +0500
commit8d1f8733b1a202431b0faf91d70f935f65b0cec2 (patch)
tree9310a4be5647ea35d16362f91a95c031ca6bed3c /accel-pppd/auth/auth_mschap_v2.c
parentbefc6e430add4b322e01c492e69dd4ccb2f02b9d (diff)
downloadaccel-ppp-xebd-8d1f8733b1a202431b0faf91d70f935f65b0cec2.tar.gz
accel-ppp-xebd-8d1f8733b1a202431b0faf91d70f935f65b0cec2.zip
ppp: lcp: auth: fix one-by-one oveflow
lcp auth doesn't take into account auth extra bytes for lcp request buffer allocation for chap/mschap/mschapv2 protocols, so last byte corrupts memory with undefined behavior incl. crash.
Diffstat (limited to 'accel-pppd/auth/auth_mschap_v2.c')
-rw-r--r--accel-pppd/auth/auth_mschap_v2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/accel-pppd/auth/auth_mschap_v2.c b/accel-pppd/auth/auth_mschap_v2.c
index 66e17f2..1c8e444 100644
--- a/accel-pppd/auth/auth_mschap_v2.c
+++ b/accel-pppd/auth/auth_mschap_v2.c
@@ -105,6 +105,7 @@ static struct auth_data_t* auth_data_init(struct ppp_t *ppp)
memset(d, 0, sizeof(*d));
d->auth.proto = PPP_CHAP;
+ d->auth.len = 1;
d->ppp = ppp;
return &d->auth;