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

Prevent heap-use-after-free and make additional checks which prevent memory leak #94

Open
wants to merge 3 commits into
base: 1.1
Choose a base branch
from

Conversation

thorkill
Copy link
Contributor

@thorkill thorkill commented Jul 7, 2015

No description provided.

…he same edge already exists

When tinc gets ADD_EDGE from older versions it will allocate
new edge in protocol_edge.c:189 due to missed case in lines 149-171 where
local_address is not defined.
If ADD_EDGE came from tinc version 1.0.x local_address.sa.sa_family is set to 0.
If it came from tinc version 1.1.x forwarded for older verion it will be 255 - AF_UNKNOWN.
For some reason the edges ware removed in one direction resulting in e->reverse
point into invalid memory.

Do not insert edge into edge_weight_tree if not needed.
@fangfufu fangfufu added 1.1 Issue related to Tinc 1.1 enhancement New feature requests or performance improvement. merge_conflict labels Jun 30, 2021
@fangfufu fangfufu added bug Issues in which the users gave a clear indication to the causes of the unexpected behaviour and removed merge_conflict enhancement New feature requests or performance improvement. labels Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.1 Issue related to Tinc 1.1 bug Issues in which the users gave a clear indication to the causes of the unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants