ppp-project / ppp

Paul's PPP Package: PPP daemon and associated utilities | Official GitHub repo: https://github.com/ppp-project/ppp
https://github.com/ppp-project/ppp
Other
374 stars 220 forks source link

pppdump/zlib.c: possible invalid array index #498

Open yarda opened 1 week ago

yarda commented 1 week ago

This was found by static analysis. I don't know whether it's possible to exploit it, but as the ZLIB compressed input data can be altered, I think there should be a sanity check:

The h is initialized to -1, i.e. no tables at https://github.com/ppp-project/ppp/blob/master/pppdump/zlib.c#L1326, but later at https://github.com/ppp-project/ppp/blob/master/pppdump/zlib.c#L1415 the x[h] is dereferenced which in case there are still no tables could be probably x[-1] i.e. invalid memory access.

yarda commented 1 week ago

ppp-2.5.0