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

It Might Be Possible to Stack Overflow in propqueue(...) in timequeue.c #686

Open
tanabi opened this issue May 1, 2023 · 1 comment
Open
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@tanabi
Copy link
Collaborator

tanabi commented May 1, 2023

The propqueue(...) call in timequeue.c does recursion without any limits. Basically, it recursively runs sub-directories.

This means, that theoretically you could create a stack overflow situation if propqueues are sufficiently nested. That said, I think on a modern system, the maximum length of a property name wouldn't be long enough to cause the program to run out of stack space. Still, each 'frame' takes up a little over 2x BUFFER_LENGTH of space and BUFFER_LENGTH is 8k ... so that adds up quickly.

If it is easy enough to do so, I'd like to actually test to see if this is a problem. Regardless, imposing a depth or limit (preferably a tunable one) would be very wise I think. At the very least, it would prevent a bad actor from loading up something with thousands of propqueue items to chug through.

@wyld-sw
Copy link
Member

wyld-sw commented May 1, 2023

Agreed. Great catch.

@tanabi tanabi added the good first issue Good for newcomers label May 4, 2023
@tanabi tanabi added this to the 7.2 milestone May 4, 2023
@wyld-sw wyld-sw self-assigned this May 4, 2023
@tanabi tanabi modified the milestones: 7.2, 7.3 Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants