frida / frida-core

Frida core library intended for static linking into bindings
https://frida.re
Other
609 stars 193 forks source link

[Barebone] unable to insert page table mapping #507

Open Manouchehri opened 6 months ago

Manouchehri commented 6 months ago

When using the backbone backend with a virtual Raspberry Pi 4 on AVH, I run into this error when attempting to use Memory.scanSync:

Error: unable to insert page table mapping; please file a bug
    at <eval> (<input>:3)
    at eval (native)
    at <anonymous> (/frida/repl-1.js)
    at evaluate (/frida/repl-1.js:57)

Script:

const pattern = '35 2e 31 35 2e 30 2d 31 30 31 32 2d 72 61 73 70 69'; // 5.15.0-1012-raspi

for (const r of Process.enumerateRanges('r--')) {
  console.log(JSON.stringify(r, null, 2));
  const matches = Memory.scanSync(r.base, r.size, pattern);
  console.log('Matches:', JSON.stringify(matches, null, 2));
}
Manouchehri commented 6 months ago

Adding a try/catch block results in a very slow process filled with mostly errors. I guess this is related to #506?

{
  "base": "0xaaaaca370000",
  "size": 4096,
  "protection": "r--",
  "type": "memory"
}
Error: Error: unable to insert page table mapping; please file a bug
{
  "base": "0xaaaaca371000",
  "size": 4096,
  "protection": "r--",
  "type": "memory"
}
Error: Error: invalid TG1 value
{
  "base": "0xaaaaca372000",
  "size": 4096,
  "protection": "r--",
  "type": "memory"
}
Error: Error: unable to insert page table mapping; please file a bug
{
  "base": "0xaaaaca373000",
  "size": 4096,
  "protection": "r--",
  "type": "memory"
}
Error: Error: invalid TG1 value
{
  "base": "0xaaaaca374000",
  "size": 4096,
  "protection": "r--",
  "type": "memory"
}
...