Uncatchable NullPointerException Crashes Target Process
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- android, java, javascript
- 领域
- devtools, mobile-dev
调研方向
唯一提供的入口点是 script.js;首先使用 Frida 16.2.1 在 Android 6 上运行复现,并通过 Java bridge 跟踪带有 null 参数的调用。确认 null 解引用不再终止目标进程,并确认 try-catch 路径收到一个 Exception。
由索引模型根据 Issue 内容生成。
描述
Description
When hooking Java methods using frida-java-bridge, calling methods on null parameters causes the target process to crash, even when the code is wrapped in a try-catch block. This is unexpected behavior for JavaScript developers and causes production apps to terminate silently.
Reproduction
Java.perform(function () {
const ArrayList = Java.use("java.util.ArrayList");
ArrayList.add.overload('java.lang.Object').implementation = function (value) {
try {
// This crashes the process when value is null
var className = value.getClass().getName();
console.log("Class:", className);
} catch (e) {
console.log("Exception caught:", e); // Never executed
}
return this.add(value);
};
});
Command:
frida -UF -l script.js
Expected Behavior
The try-catch block should catch the NullPointerException when value is null, log the error message, and allow the application to continue running.
Actual Behavior
The target process terminates immediately:
Process terminated
The exception is never caught, and no error message appears in the console.
Environment
Frida version: 16.2.1
Target platform: Android 6
Script language: JavaScript
- 主要语言
- JavaScript
- 星标
- 414
- 派生
- 174
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
frida/frida-java-bridge 的其他 Issue
-
Types is missing `deoptimizeMethod`可能已有人在做 @Electric1447 于 181 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 65/100
frida/frida-java-bridge#386 ·
-
[v7.0.11+] Process crash on accessing object["<init>"] with JVMTI available可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
frida/frida-java-bridge#384 · 2 条评论 · 2 个 reaction ·
-
[Android 17] Early observations: JIT thread pool crash on attach and JNI transition frame aborts未关闭
难度 5/5 一周以上 新手友好度 12/100
frida/frida-java-bridge#411 ·
-
难度 3/5 1-2 天 新手友好度 42/100
frida/frida-java-bridge#409 ·
-
ensureClassInitialized() no longer initializes on ART since 7983e815 — hooks on uninitialized classes install successfully but never dispatch可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 52/100
frida/frida-java-bridge#408 ·
查看 frida/frida-java-bridge 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
maintenance
难度 1/5 1 小时以内 新手友好度 75/100
alphagov/accessible-autocomplete#826 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
olahol/react-tagsinput#229 ·
-
[BUG] npm pkg delete removes the first array item for a nonexistent property可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
jonathanong/no-mistakes#2260 · 1 条评论 ·
维护者通常 1 天内回复