sepinf-inc / IPED

IPED Digital Forensic Tool. It is an open source software that can be used to process and analyze digital evidence, often seized at crime scenes by law enforcement or in a corporate investigation by private examiners.
Other
901 stars 215 forks source link

AIOOBE in ScriptTask #1625

Open aberenguel opened 1 year ago

aberenguel commented 1 year ago

I'm using IPED 4.2-snapshot (commit 1e04e83bb)

The console logged these lines:

java.lang.Exception: Worker-3 Error while processing /item03_XXXX-PC_C_Drive001-antigo_vdi.E01/Users/XXXXXX/AppData/Local/Google/Chrome/User Data/System Profile/History (118784bytes)
        at iped.engine.core.Worker.process(Worker.java:186) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.core.Worker.run(Worker.java:265) ~[iped-engine-4.2-snapshot.jar:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 0
        at java.util.ArrayList.add(ArrayList.java:487) ~[?:?]
        at java.util.ArrayList.add(ArrayList.java:499) ~[?:?]
        at jdk.nashorn.internal.runtime.ScriptObject.addProtoFilter(ScriptObject.java:1941) ~[jdk.scripting.nashorn:?]
        at jdk.nashorn.internal.runtime.ScriptObject.findGetMethod(ScriptObject.java:2012) ~[jdk.scripting.nashorn:?]
        at jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1866) ~[jdk.scripting.nashorn:?]
        at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:104) ~[jdk.scripting.nashorn:?]
        at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:96) ~[jdk.scripting.nashorn:?]
        at jdk.dynalink.linker.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:161) ~[jdk.dynalink:?]
        at jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:109) ~[jdk.dynalink:?]
        at jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(LinkerServicesImpl.java:137) ~[jdk.dynalink:?]
        at jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(LinkerServicesImpl.java:168) ~[jdk.dynalink:?]
        at jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:135) ~[jdk.dynalink:?]
        at jdk.dynalink.DynamicLinker.relink(DynamicLinker.java:242) ~[jdk.dynalink:?]
        at jdk.nashorn.internal.scripts.Script$Recompilation$188$371A$\^eval\_$cu1$restOf.process(<eval>:39) ~[?:?]
        at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:657) ~[jdk.scripting.nashorn:?]
        at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513) ~[jdk.scripting.nashorn:?]
        at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527) ~[jdk.scripting.nashorn:?]
        at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:202) ~[jdk.scripting.nashorn:?]
        at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:393) ~[jdk.scripting.nashorn:?]
        at jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:197) ~[jdk.scripting.nashorn:?]
        at iped.engine.task.ScriptTask.process(ScriptTask.java:122) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.processMonitorTimeout(AbstractTask.java:277) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.processAndSendToNextTask(AbstractTask.java:192) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.sendToNextTask(AbstractTask.java:225) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.processAndSendToNextTask(AbstractTask.java:205) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.sendToNextTask(AbstractTask.java:225) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.processAndSendToNextTask(AbstractTask.java:205) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.sendToNextTask(AbstractTask.java:225) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.processAndSendToNextTask(AbstractTask.java:205) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.sendToNextTask(AbstractTask.java:225) ~[iped-engine-4.2-snapshot.jar:?]
        at iped.engine.task.AbstractTask.processAndSendToNextTask(AbstractTask.java:205) ~[iped-engine-4.2-snapshot.jar:?]
...
lfcnassif commented 1 year ago

Could you share History (118784bytes) file privately so we can reproduce the issue?

lfcnassif commented 1 year ago

Thanks for the file. Unfortunately I wasn't able to reproduce the error, even copying the whole file path (with your replacements). Do you have any additional javascript script installed in the used profile? Have you changed any of them, e.g. RefineCategoryTask.js?

lfcnassif commented 1 year ago

Have you changed any of them, e.g. RefineCategoryTask.js?

I also couldn't find any direct call to ArrayList.add() in the default RefineCategoryTask.js. Looking at the line 499 of ArrayList class, seems AIOOBE just can be thrown if the same ArrayList object is used by multiple threads (it is not thread safe). I don't think this is done by the default RefineCategoryTask.js, so let me know if you changed it or if you installed a new script in the pipeline.

lfcnassif commented 1 year ago

Unfortunately I wasn't able to reproduce this, so I'll close as can't reproduce, sorry. If it happens again with the default profiles or if you can provide a step by step to reproduce it artificially, please reopen.

lfcnassif commented 1 year ago

Another user reported this happened 2 times with 4.1.1 version on Linux, randomly. So I'm reopening to investigate again. @aberenguel what SO did you use?

aberenguel commented 1 year ago

Another user reported this happened 2 times with 4.1.1 version on Linux, randomly. So I'm reopening to investigate again. @aberenguel what SO did you use?

I'm using Kubuntu 22.04 in the HP Z8.

lfcnassif commented 1 year ago

I'm suspecting this is a JDK issue, what was the used java version?

aberenguel commented 1 year ago

I'm suspecting this is a JDK issue, what was the used java version?

When the bug happened, I was using Liberica Full JDK 11.0.17.

lfcnassif commented 4 months ago

@aberenguel did you reproduce this again since then???