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

pppd/ipcp.c: possible overflow #500

Open
yarda opened this issue Jun 24, 2024 · 1 comment
Open

pppd/ipcp.c: possible overflow #500

yarda opened this issue Jun 24, 2024 · 1 comment

Comments

@yarda
Copy link
Contributor

yarda commented Jun 24, 2024

The following was found by static analysis.

16 bit cilen is assigned 32 bit l at https://github.com/ppp-project/ppp/blob/master/pppd/ipcp.c#L1468 and there is no check for overflow so I am afraid it could be overflown.

@paulusmack
Copy link
Collaborator

In isolation, yes that could perhaps happen; in the context of the rest of the code, the packets that we are processing always come from read_packet() (defined in sys-linux.c or sys-solaris.c) and those limit the packet length to no more than 1504 bytes. So I don't think there is a pressing issue here. I would be OK with changing cilen to int or unsigned int just to be sure.

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

No branches or pull requests

2 participants