fix: null-guard TCP phy user pointer - #295
Open
brukberhane wants to merge 1 commit into
Open
brukberhane wants to merge 1 commit into
brukberhane wants to merge 1 commit into
Conversation
phyOnTcpConnect already bails on null *uptr; data/writable did not. Null deref SIGSEGV on libzt-node kills the process and leaves HTTP_PROXY pointing at a dead loopback.
Contributor
|
FYI,
The cla-assistant isn't working.
... not that anyone would ever notice.
…-s
On Wed, Sep 2, 2026 at 9:18 AM CLAassistant ***@***.***> wrote:
*CLAassistant* left a comment (zerotier/libzt#295)
<#295 (comment)>
[image: CLA assistant check]
<https://cla-assistant.io/zerotier/libzt?pullRequest=295>
Thank you for your submission! We really appreciate it. Like many open
source projects, we ask that you sign our Contributor License Agreement
<https://cla-assistant.io/zerotier/libzt?pullRequest=295> before we can
accept your contribution.
You have signed the CLA already but the status is still pending? Let us
recheck <https://cla-assistant.io/check/zerotier/libzt?pullRequest=295>
it.
—
Reply to this email directly, view it on GitHub
<#295?email_source=notifications&email_token=AAAQ3TGSAW5AIHILP2JFWUD5M7CWHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJQGU4TKMJSGUZKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-5505951252>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQ3TBL2EB4QR2CVZJQYF35M7CWHAVCNFSNUABEKJSXA33TNF2G64TZHM3DGNRUGIYDINJ3JFZXG5LFHM2TGMRQHE4DQNJYGSQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAAQ3THDOHXPXWS4ZMNJ5CD5M7CWHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJQGU4TKMJSGUZKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSVGM33PORSXEX3JN5ZQ>
and Android
<https://github.com/notifications/mobile/android/AAAQ3THDVWTSVQKE2WBXFBD5M7CWHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJQGU4TKMJSGUZKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
phyOnTcpConnectalready treats a null*uptras a closed socket (_phy.close(sock, true)).phyOnTcpDataandphyOnTcpWritabledereference it asTcpConnection*with no check.NodeServiceon thelibzt-nodethread and kills the process.Changes
phyOnTcpConnect: iftcis null, close the socket and return.phyOnTcpClosealready null-checks. No otherTcpConnection*callbacks in this file.ZeroTierOne
service/OneService.cpphas the same unguarded data/writable path (connect is already guarded). This PR only touches libztNodeService.cpp.Test plan
zts_node_startwith TCP relay/fallback traffic; no SIGSEGV inphyOnTcpData/phyOnTcpWritable