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

Segmentation Fault #1577

Open
1 of 2 tasks
antnn opened this issue Jan 1, 2025 · 2 comments
Open
1 of 2 tasks

Segmentation Fault #1577

antnn opened this issue Jan 1, 2025 · 2 comments
Labels
bug Something isn't working reviewed

Comments

@antnn
Copy link

antnn commented Jan 1, 2025

  • I searched and no similar issues were found

Platform/OS

Linux

OS version

fedora:fedora/41/x86_64/kinoite Version: 41.20241230.0 (2024-12-30T00:46:12Z)

Hiddify Version

2.3.1

What Happened?

Summary:
A segmentation fault (SIGSEGV) occurs in the Go application during execution, leading to an unexpected crash. The error is traced back to the net/netip.Addr.Zone(...) function, indicating an issue with memory access. Environment:

Application: Hiddify (sing-box and sing-dns modules)
Version: sing-box v1.8.9, sing-dns v0.2.3

Minimal Reproducible Example (MRE)

Run hiddify
Use hiddify (proxy mode, not system proxx) with chrome and smartproxy extension

Expected Behavior

No response

Additional Context

No response

Application Config Options

No response

Relevant log output

unexpected fault address 0x101010100
fatal error: fault
unexpected fault address 0x101010100
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0x101010100 pc=0x7fbbb15ddbae]

goroutine 26824 gp=0xc0009fe380 m=23 mp=0xc000c08808 [running]:
runtime.throw({0x7fbbb23057f5?, 0x0?})
        runtime/panic.go:1023 +0x5e fp=0xc000ba3708 sp=0xc000ba36d8 pc=0x7fbbb108409e
runtime.sigpanic()
        runtime/signal_unix.go:895 +0x285 fp=0xc000ba3768 sp=0xc000ba3708 pc=0x7fbbb109cd25
net/netip.Addr.Zone(...)
        net/netip/netip.go:404
go4.org/netipx.(*IPSet).Contains(0xc000e97950?, {{0xc000ba3958?, 0x7fbbb1657214?}, 0x101010100?})
        go4.org/netipx@v0.0.0-20231129151722-fdeea329fbba/ipset.go:370 +0x2e fp=0xc000ba3830 sp=0xc000ba3768 pc=0x7fbbb15ddbae
github.com/sagernet/sing-box/route.(*IPCIDRItem).Match(0xc00041c040, 0xc000ba38d0?)
        github.com/sagernet/sing-box@v1.8.9/route/rule_item_cidr.go:83 +0xda fp=0xc000ba38a0 sp=0xc000ba3830 pc=0x7fbbb223a1fa
github.com/sagernet/sing-box/route.(*abstractDefaultRule).Match(0xc0004ce410, 0xc000ac2340)
        github.com/sagernet/sing-box@v1.8.9/route/rule_abstract.go:100 +0x2a2 fp=0xc000ba38d0 sp=0xc000ba38a0 pc=0x7fbbb222b4a2
github.com/sagernet/sing-box/route.(*DefaultHeadlessRule).Match(0xc000a8f0e0?, 0x0?)
        <autogenerated>:1 +0x1e fp=0xc000ba38f0 sp=0xc000ba38d0 pc=0x7fbbb2247d5e
github.com/sagernet/sing-box/route.(*RemoteRuleSet).Match(0x7fbbb1657340?, 0xc000ac2340)
        github.com/sagernet/sing-box@v1.8.9/route/rule_set_remote.go:66 +0x55 fp=0xc000ba3920 sp=0xc000ba38f0 pc=0x7fbbb223ecb5
github.com/sagernet/sing-box/route.(*RuleSetItem).Match(0xc000ba3920?, 0xc000ac2340)
        github.com/sagernet/sing-box@v1.8.9/route/rule_item_rule_set.go:43 +0x5c fp=0xc000ba3950 sp=0xc000ba3920 pc=0x7fbbb223d23c
github.com/sagernet/sing-box/route.(*abstractDefaultRule).Match(0xc00039a2d0, 0xc000ac2340)
        github.com/sagernet/sing-box@v1.8.9/route/rule_abstract.go:121 +0x14c fp=0xc000ba3980 sp=0xc000ba3950 pc=0x7fbbb222b34c
github.com/sagernet/sing-box/route.(*DefaultDNSRule).MatchAddressLimit(0xc000ba39e0?, 0x7fbbb165ad4d?)
        github.com/sagernet/sing-box@v1.8.9/route/rule_dns.go:266 +0x15 fp=0xc000ba39a0 sp=0xc000ba3980 pc=0x7fbbb2235b35
github.com/sagernet/sing-box/route.(*Router).Lookup.func1({0x7fbbb38eada0?, 0xc00003bc20?, 0x7fbbb276cc60?})
        github.com/sagernet/sing-box@v1.8.9/route/router_dns.go:226 +0x5c fp=0xc000ba39c0 sp=0xc000ba39a0 pc=0x7fbbb222815c
github.com/sagernet/sing-dns.(*Client).lookupToExchange.func1(0xc0003645b0?)
        github.com/sagernet/sing-dns@v0.2.3/client.go:582 +0x37 fp=0xc000ba39f0 sp=0xc000ba39c0 pc=0x7fbbb16537d7
github.com/sagernet/sing-dns.(*Client).ExchangeWithResponseCheck(0xc0004d20c0, {0x7fbbb2a733f0, 0xc000a94a50}, {0x7fbbb2a7cd20, 0xc0003645b0}, 0xc00003bc20, 0x0, 0xc000ba3df8)
        github.com/sagernet/sing-dns@v0.2.3/client.go:156 +0x967 fp=0xc000ba3d88 sp=0xc000ba39f0 pc=0x7fbbb164fde7
github.com/sagernet/sing-dns.(*Client).lookupToExchange(0xc0004d20c0, {0x7fbbb2a733f0, 0xc000a94a50}, {0x7fbbb2a7cd20, 0xc0003645b0}, {0xc000056fd8, 0x14}, 0x1c, 0x0, 0xc000e978d8)
        github.com/sagernet/sing-dns@v0.2.3/client.go:577 +0x2ba fp=0xc000ba3ea0 sp=0xc000ba3d88 pc=0x7fbbb165369a
github.com/sagernet/sing-dns.(*Client).LookupWithResponseCheck.func2({0x7fbbb2a733f0?, 0xc000a94a50?})
        github.com/sagernet/sing-dns@v0.2.3/client.go:232 +0x5a fp=0xc000ba3f00 sp=0xc000ba3ea0 pc=0x7fbbb165223a
github.com/sagernet/sing/common/task.(*Group).RunContextList.func1()
        github.com/sagernet/sing@v0.4.2/common/task/task.go:91 +0x107 fp=0xc000ba3fe0 sp=0xc000ba3f00 pc=0x7fbbb15e2fc7
runtime.goexit({})
        runtime/asm_amd64.s:1695 +0x1 fp=0xc000ba3fe8 sp=0xc000ba3fe0 pc=0x7fbbb10bf4e1
created by github.com/sagernet/sing/common/task.(*Group).RunContextList in goroutine 26788
        github.com/sagernet/sing@v0.4.2/common/task/task.go:75 +0x198

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

hiddifybug.txt

@antnn antnn added the bug Something isn't working label Jan 1, 2025
@mayooot
Copy link

mayooot commented Jan 3, 2025

This looks like a sing-box config problem, or you can share your configuration file?

@antnn
Copy link
Author

antnn commented Jan 4, 2025

This looks like a sing-box config problem, or you can share your configuration file?

config_combined.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reviewed
Projects
Status: No status
Development

No branches or pull requests

3 participants