Panic on openwrt
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38.1k
- Forks
- 4.6k
- Avg merge
- 19d 15h
- Merged PRs (30d)
- 1
Description
Operating system
Linux
System version
Linux Nano-R5C 6.1.99 #1 SMP Mon Mar 24 18:07:53 CST 2025 aarch64 GNU/Linux
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
No response
Version
# /usr/local/bin/sing-box version
sing-box version 1.14.1
Environment: go1.27.1 linux/arm64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,with_grpc,with_v2ray_api,with_cloudflared
Revision: 1ac1a339cb1223e9c70eae14c44411c75033c02d
CGO: disabled
Description
panic: runtime error: slice bounds out of range [:4803] with capacity 4096
goroutine 1412 [running]:
bufio.(*Reader).ReadSlice(0x17409fec4e40, 0xa)
bufio/bufio.go:352 +0x1ac
bufio.(*Reader).ReadLine(0x17409fec4e40)
bufio/bufio.go:406 +0x24
net/textproto.(*Reader).readLineSlice(0x1740a11725d0, 0xffffffffffffffff)
net/textproto/reader.go:64 +0x8c
net/textproto.(*Reader).ReadLine(...)
net/textproto/reader.go:44
net/http.readRequestLimit(0x17409fec4e40, 0x7fffffffffffffff)
net/http/request.go:1106 +0x70
net/http.readRequest(0x3734b00?)
net/http/request.go:1095 +0x20
github.com/sagernet/sing/protocol/http.HandleConnectionEx({0x3734b00, 0x1740a0331290}, {0x373e1f8, 0x17409fa02480}, 0x17409fec4e40, 0x0, {0xffff5bcdd530, 0x17409fe61c08}, {{{0x0, 0xffff0a0000a4}, ...}, ...}, ...)
github.com/sagernet/sing@v0.9.4/protocol/http/handshake.go:32 +0x100
github.com/sagernet/sing-box/protocol/mixed.(*Inbound).newConnection(_, {_, _}, {_, _}, {{0x0, 0x0}, {0x0, 0x0}, 0x0, ...}, ...)
github.com/sagernet/sing-box/protocol/mixed/inbound.go:131 +0x6a8
github.com/sagernet/sing-box/protocol/mixed.(*Inbound).NewConnection(_, {_, _}, {_, _}, {{0x0, 0x0}, {0x0, 0x0}, 0x0, ...}, ...)
github.com/sagernet/sing-box/protocol/mixed/inbound.go:103 +0x78
created by github.com/sagernet/sing-box/common/listener.(*Listener).loopTCPIn in goroutine 32
github.com/sagernet/sing-box/common/listener/listener_tcp.go:109 +0x330
Reproduction
No idea
Logs
Supporter
- I am a sponsor
Integrity requirements
- I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
- I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
- I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
- I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the panic on the reported Linux arm64/OpenWrt setup, then read github.com/sagernet/sing/protocol/http/handshake.go and protocol/mixed/inbound.go at the stack-trace locations. Trace the request handling reached through mixed.Inbound.NewConnection and determine the input that causes the slice-bounds panic. Done means the reported connection no longer panics under the same conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100