Skip to content

QUIC sniffer: Fix potential slice panic#4732

Merged
RPRX merged 1 commit intomainfrom
QUIC-sniff-test
May 16, 2025
Merged

QUIC sniffer: Fix potential slice panic#4732
RPRX merged 1 commit intomainfrom
QUIC-sniff-test

Conversation

@Fangliding
Copy link
Member

as said

@RPRX RPRX merged commit ef1c165 into main May 16, 2025
79 checks passed
@awerqo
Copy link

awerqo commented Jun 2, 2025

Hi!
Thanks a lot for fixing this! 🙏
Not 100% sure, but I may have faced something similar in a real-world scenario.
@Fangliding — based on this log, do you think it was the same issue, or should I investigate further?

xray.service: Failed with result 'exit-code'.
xray.service: Start request repeated too quickly.
Stopped Xray Service.
xray.service: Scheduled restart job, restart counter is at 596.
xray.service: Failed with result 'exit-code'.
xray.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
        github.com/xtls/xray-core/app/dispatcher/default.go:238 +0x405
created by github.com/xtls/xray-core/app/dispatcher.(*DefaultDispatcher).Dispatch in goroutine 124
        github.com/xtls/xray-core/app/dispatcher/default.go:243 +0x11c
github.com/xtls/xray-core/app/dispatcher.(*DefaultDispatcher).Dispatch.func1()
        github.com/xtls/xray-core/app/dispatcher/default.go:360 +0x10f
github.com/xtls/xray-core/app/dispatcher.sniffer({0x14b68d0, 0xc0003639e0}, 0x14b68d0?, 0x0, 0xc0?)
        github.com/xtls/xray-core/app/dispatcher/default.go:350 +0x125
github.com/xtls/xray-core/app/dispatcher.sniffer.func1({0x14b68d0, 0xc0003639e0}, 0xc0003639e0?, 0xc000363b60, 0xc000061e80?, 0>
        github.com/xtls/xray-core/app/dispatcher/sniffer.go:64 +0xdf
github.com/xtls/xray-core/app/dispatcher.(*Sniffer).Sniff(0xc000341a70, {0x14b68d0, 0xc0003639e0}, {0xc0002a6000, 0x9c4, 0x2000>
        github.com/xtls/xray-core/app/dispatcher/sniffer.go:40 +0x25
github.com/xtls/xray-core/app/dispatcher.NewSniffer.func4({0x84e4aa?, 0xc000048100?}, {0xc0002a6000?, 0x80?, 0x11afdc0?})
        github.com/xtls/xray-core/common/protocol/quic/sniff.go:220 +0x1c93
github.com/xtls/xray-core/common/protocol/quic.SniffQUIC({0xc0002a6000, 0x9c4, 0x2000})
goroutine 125 [running]:
panic: runtime error: slice bounds out of range [:2246] with capacity 2048

@Fangliding
Copy link
Member Author

这看起来不像是最新版本的抛出的错误

@RPRX RPRX deleted the QUIC-sniff-test branch July 21, 2025 04:58
maoxikun pushed a commit to maoxikun/Xray-core that referenced this pull request Aug 23, 2025
it2konst pushed a commit to it2konst/gametunnel-core that referenced this pull request Mar 1, 2026
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.

3 participants