panic: runtime error: slice bounds out of range #132

Closed
soffchen opened this Issue May 3, 2016 · 9 comments

Projects

None yet

4 participants

@soffchen
soffchen commented May 3, 2016 edited

下载的 v1.12.3 release, linux 64

客户端访问 frontend 的 ss 时,直接在 frontend 报 panic

panic: runtime error: slice bounds out of range

goroutine 261 [running]:
panic(0x7e5cc0, 0xc820010080)
        /home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/panic.go:464 +0x3e6
github.com/v2ray/v2ray-core/proxy/shadowsocks.(*Shadowsocks).handleConnection.func1(0x7fd274e2c798, 0xc820079f10, 0x10, 0xc8203570c0, 0xc820011a20, 0x10, 0x10, 0x7fd274e2c428, 0xc82063bae0, 0xc820079f20)
        /home/travis/gopath/src/github.com/v2ray/v2ray-core/proxy/shadowsocks/shadowsocks.go:221 +0x857
created by github.com/v2ray/v2ray-core/proxy/shadowsocks.(*Shadowsocks).handleConnection
        /home/travis/gopath/src/github.com/v2ray/v2ray-core/proxy/shadowsocks/shadowsocks.go:235 +0x1480

frontend:

{
  "port": xxx,
  "log": {
    "access": ""
  },
  "inbound": {
    "protocol": "shadowsocks",
    "settings": {
      "method": "aes-128-cfb",
      "udp": false,
      "password": "xxx",
      "level": 1
    }
  },
  "outbound": {
    "protocol": "vmess",
    "settings": {
      "vnext": [
        {
          "address": "xxx",
          "port": xxx,
          "users": [
            {
              "id": "6196fe92-79bb-432d-a322-xxx"
            }
          ]
        }
      ]
    }
  }
}

backend:

{
  "port": xxx,
  "log" : {
  },
  "inbound": {
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "6196fe92-79bb-432d-a322-xxx",
          "level": 1
        }
      ]
    }
  },
  "outbound": {
    "protocol": "freedom",
    "settings": {}
  }
}
@v2ray
Owner
v2ray commented May 3, 2016

Can you try v1.12.4?

@soffchen
soffchen commented May 3, 2016 edited

还有问题

$ curl --socks5 127.0.0.1:10049 ip.cn
�)�HTTP/1.1 200 OK
Server: nginx/1.8.1
Date: Tue, 03 May 2016 15:23:55 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive

37
当前 IP:xxxxxxx 来自:新加坡 LeaseWeb

多了几个字节,然后没有 EOF,就是 curl 没停止。

@soffchen
soffchen commented May 3, 2016

经过很长时间之后,停下来了,打出来一个 0

�)�HTTP/1.1 200 OK
Server: nginx/1.8.1
Date: Tue, 03 May 2016 15:23:55 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive

37
当前 IP:xxxxxxx 来自:新加坡 LeaseWeb


0%
@v2ray
Owner
v2ray commented May 3, 2016

你的连接模式是 socks <-> shadowsocks <-> vmess <-> 网站 ?ss 客户端用的是哪一个?

@soffchen
soffchen commented May 4, 2016

对的,配置上面都给出来了,本地连接 shadowsocks 生成 socks 的,shadowsocks-libev 2.4.5

用 Surge 连,直接报 ERR_SSL_PROTOCOL_ERROR

@windyboy
windyboy commented May 4, 2016

我的情况和楼主类似,客户端出了一样panic
但是同一个客户端,连freebsd上的服务端就没问题,连linux就出错
服务端,客户端都是我手动编译的版本
客户端在OSX上
出错的服务端: 2.6.32-042stab108.8 #1 SMP Wed Jul 22 17:23:23 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux

@whwlsfb
whwlsfb commented May 4, 2016

我也出现了这个问题,版本是1.12.4,我的是socks -> vmss(多服务器,动态端口) -> freedom
错误:
C:\v2>v2ray.exe
V2Ray v1.12.4 (New Order) 20160503
An unified platform for anti-censorship.
2016/05/04 13:24:51 [Warning]Point server started on port 1080
panic: runtime error: slice bounds out of range

goroutine 16 [running]:
panic(0x7e9620, 0xc082002050)
/home/travis/.gimme/versions/go1.6.linux.amd64/src/runtime/panic.go:464
+0x3f4
github.com/v2ray/v2ray-core/proxy/vmess/io.(_AuthChunkReader).Read(0xc0824bf080,
0xc082593f00, 0x0, 0x0)
/home/travis/gopath/src/github.com/v2ray/v2ray-core/proxy/vmess/io/reade
r.go:37 +0x5f4
github.com/v2ray/v2ray-core/common/io.Pipe(0x2bc460, 0xc0824bf080, 0x2bc238, 0xc
08245ee70, 0x0, 0x0)
/home/travis/gopath/src/github.com/v2ray/v2ray-core/common/io/transport.
go:5 +0x3e
github.com/v2ray/v2ray-core/proxy/vmess/outbound.(_VMessOutboundHandler).handleR
esponse(0xc0824305d8, 0xc0823a8500, 0x3bd590, 0xc082430698, 0xc08245ef60, 0x2bac
90, 0xc0824c4620, 0x2bc238, 0xc08245ee70, 0xc0824bef78)
/home/travis/gopath/src/github.com/v2ray/v2ray-core/proxy/vmess/outbound
/outbound.go:124 +0x470
created by github.com/v2ray/v2ray-core/proxy/vmess/outbound.(*VMessOutboundHandl
er).Dispatch
/home/travis/gopath/src/github.com/v2ray/v2ray-core/proxy/vmess/outbound
/outbound.go:63 +0x94e

@v2ray v2ray added the bug label May 4, 2016
@v2ray v2ray added this to the Version 2.0 milestone May 4, 2016
@v2ray v2ray self-assigned this May 4, 2016
@v2ray
Owner
v2ray commented May 4, 2016

主要问题出在 VMess Outbound,临时的解决方案是把客户端降回 1.11.x,服务器可以继续使用1.12.x。

@v2ray
Owner
v2ray commented May 14, 2016

Completely fixed in 1.12.9

@v2ray v2ray closed this May 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment