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

allowedips: Increase stack size #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

damianhxy
Copy link

A stack size of 128 is insufficient in the worst-case scenario and leads to a system freeze upon stopping / using syncconf

root_free_rcu / root_remove_peer_lists:
We can have up to 128 "0" branches and 1 "1" branch pushed into the stack at once, for a total of 129 elements

walk_remove_by_peer:
With 129 possible CIDR values, we can have up to 129 elements in the stack at once

Such configurations are (very) unlikely to occur as it would require rather specific peer allowedips
However, it would still be good to guard against such scenarios as they are technically possible (I have managed to trigger said scenarios)

Signed-off-by: Damian Ho damian_ho_xu_yang@yahoo.com

A stack size of 128 is insufficient in the worst-case scenario

Signed-off-by: Damian Ho <damian_ho_xu_yang@yahoo.com>
@zx2c4-bot zx2c4-bot force-pushed the master branch 14 times, most recently from ed89fed to 8f4414d Compare June 5, 2021 22:13
@zx2c4-bot zx2c4-bot force-pushed the master branch 4 times, most recently from e8db181 to ea6b8e7 Compare December 3, 2021 22:24
@zx2c4-bot zx2c4-bot force-pushed the master branch 3 times, most recently from 7cd1d2e to ffb8cd6 Compare March 2, 2022 23:10
@zx2c4-bot zx2c4-bot force-pushed the master branch 3 times, most recently from 4626f5e to f9d9b4d Compare April 14, 2022 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant