🔧 Bugfix: Refactor RKP rust migration and fix double-free bug#837
Conversation
- Removed double-free memory leak vulnerability in `BinderInterceptor.kt`. The vulnerability was caused by explicitly tracking `theData` and `theReply` arrays inside a try-catch pattern and disposing them after checking `OverrideData` or `OverrideReply` conditions instead of checking them inside a `finally` block where variables aren't checked properly. - Replaced dummy Kotlin implementation for `createProtectedData` with a rust implementation. Replaced `ProtectedData(createProtectedData())` with `ProtectedData(createProtectedDataNatively())` in `RkpInterceptor.kt`. Deleted dummy implementation from `RkpInterceptor.kt`. - Removed `binder_router.cpp` legacy logic because it was replaced with frida-gum bindings implemented natively in Rust.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
BinderInterceptor.ktinsideonTransact. Changedfinallyblock tocatchand properly validated if instances shouldn't be overridden before disposing them.createProtectedDatausages bycreateProtectedDataNativelyand deleted dummy implementations in Kotlin.binder_router.cppsince Frida hooks natively execute usingfrida-gumcrate.PR created automatically by Jules for task 4569474389639897470 started by @tryigit