shadowsocks-libev-3.1.0
Ubuntu 16.04 64 bit
In parsing json configuration file, two of the properties ("mode", "plugin") do not perform null checking before invoking strlen,
feeding null json value to "mode" or "plugin" property will trigger process crash.
PoC:
(py3) ➜ src ./ss-server -c config.json
[1] 28610 segmentation fault (core dumped) ./ss-server -c config.json
(py3) ➜ src cat config.json
{
"server":"my_server_ip",
"server_port":8388,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"mypassword",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false,
"plugin": null
}
Regards,
Alex, SourceBrella Inc.
Cool! Thanks for reporting this!
@madeye the "mode" property shares the similar issue:
https://github.com/shadowsocks/shadowsocks-libev/blob/b3f3b58a1d33da73f42420e1d4ec904beb5a9761/src/jconf.c#L295-L300
I just notice that it's part of this paper now: http://www.cs.ust.hk/~charlesz/pinpoint.pdf
Great work!
Most helpful comment
Cool! Thanks for reporting this!