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

android: fix memory overwriting in uv_interface_addresses() #2767

Closed
wants to merge 2 commits into from

Conversation

linroid
Copy link
Contributor

@linroid linroid commented Apr 2, 2020

Fix a regression of #2486.

For IFA_ADDRESS and IFA_LOCAL network interface, we'll write two IP addresses to ifaddrs:

In that PR, it added a break, then we only malloc one IP address memory space for l_entry, which leads to memory overwriting issue.

@bnoordhuis
Copy link
Member

@linroid You're targeting master with this PR but you probably want to target the v1.x branch because that's where releases are cut from.

I can't cherry-pick it to v1.x because it doesn't apply cleanly. Can you retarget this PR? Thanks.

bnoordhuis pushed a commit that referenced this pull request Apr 6, 2020
PR-URL: #2767
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@bnoordhuis
Copy link
Member

Never mind, I was able to merge it with some wedging. Landed in v1.x in commit 7656e98, thanks!

@bnoordhuis bnoordhuis closed this Apr 6, 2020
@linroid linroid deleted the fix_android_memory_overwriting branch April 6, 2020 10:54
ghost pushed a commit to termux/termux-packages that referenced this pull request Apr 26, 2020
ghost pushed a commit to termux/termux-packages that referenced this pull request Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants