Exploit database

GH-68d71207edb01409665b89bdcf54e3e2

bomberfish/mandela-classic

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2022-46689

15 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files7
bomberfish/mandela-classicRevision b8f0826c522c

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

Mandela/Exploit/vm_unaligned_copy_switch_race.h

Text · 669 bytes
//
//  vm_unaligned_copy_switch_race.h
//  PsychicPaper
//
//  Created by Hariz Shirazi on 2023-02-04.
//

#pragma once
#include <stdlib.h>
#include <stdbool.h>
/// Uses CVE-2022-46689 to overwrite `overwrite_length` bytes of `file_to_overwrite` with `overwrite_data`, starting from `file_offset`.
/// `page_to_overwrite` should be a page aligned `PROT_READ` `MAP_SHARED` region. ``
/// `overwrite_length` must be less than or equal to `PAGE_SIZE`.
/// Returns `true` if the overwrite succeeded, and `false` if the device is not vulnerable.
bool unaligned_copy_switch_race(int file_to_overwrite, off_t file_offset, const void* overwrite_data, size_t overwrite_length);