Kernel panic on OnePlus Ace 2 (PHK110, 5.10.236-android12-9, KMI android12-5.10) right after first namespace use
Summary
On a stock OnePlus Ace 2 (PHK110) running 5.10.236-android12-9 vendor kernel
(KMI android12-5.10), the 4.0.5 module loads successfully (insmod returns 0,
lsmod shows lkm4ctr), but the device panics and reboots as soon as a real
container-namespace operation happens (running lkm4ctr_checker afterwards).
No panic stack was recoverable on this device (pstore/ramoops disabled,
/proc/last_kmsg absent, all minidump partitions empty), but the vendor's own
/proc/last_boot_reason classifies the reboot as kernel crash Minidump.
Environment
- Device: OnePlus Ace 2
PHK110/OP5913L1, ColorOS 16 / Android 16 - Kernel:
5.10.236-android12-9-o-ga85e2b4db464(aarch64, GKI-derived vendor kernel) - Detected KMI:
android12-5.10 - Root: KernelSU 3.3.1 (uapi 5), manager installed; SELinux
Enforcing, su domainu:r:ksu:s0 - Module used:
kmi/lkm4ctr-android12-5.10-arm64.ko(14,794,048 bytes) fromlkm4ctr-kernelsu-module.zip(27,300,879 bytes, release 4.0.5) - Installed manually with
insmodonly — the KernelSU ZIP was not installed into/data/adb/modules, boot autoload was never enabled.
Relevant kernel config
Present:
CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y
CONFIG_KPROBES=y CONFIG_FTRACE=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y
CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_NET_NS=y CONFIG_TIME_NS=y CONFIG_CGROUPS=y
CONFIG_FUSE_FS=y CONFIG_OVERLAY_FS=y CONFIG_CFI_CLANG=y
Missing (the reason we wanted this module):
# CONFIG_PID_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_SYSVIPC is not set
# CONFIG_POSIX_MQUEUE is not set
No CONFIG_MODULE_SIG* at all (unsigned modules are accepted).
Baseline checker (before load)
lkm4ctr_checker 4.0.5 → 19 FAIL, 0 STUB, as expected for this kernel:
ns_pid, ns_user, ns_ipc, proc_ns_access/link (IPC/PID), mqueue, sysvipc,
clone(CLONE_SYSVSEM), overlay2. ns_uts, ns_net, ns_mnt, ns_cgroup, pidfd_open,
ptrace, wait4/waitid pass.
Static pre-checks I did before loading (all clean)
- All 225 undefined symbols imported by the
.koare exported by this kernel (checked/proc/kallsymsfor__ksymtab_*names → 0 missing). vermagicof the.kois5.10.252-dirty SMP preempt mod_unload modversions aarch64; kernel is5.10.236-android12-9-…. 5.10'ssame_magic()compares from the first space onwards when the module has a__versionssection, so the version prefix is ignored — the flags (SMP preempt mod_unload modversions aarch64) match.- The
.kohas a__versionssection with size 0 → CRC checks are skipped (only the "no symbol version" warning / taint). - No module signature enforcement on this kernel.
What happened
insmod lkm4ctr-android12-5.10-arm64.ko→ exit 0,lsmodreportslkm4ctr 892928 2.- Kernel log right after load looked healthy:
lkm4ctr: hotreload: loaded: this is a first load (...)
lkm4ctr: lkm4ctr: loaded unified module (vendor_kernel auto-started; mount -t lkm4ctr diag <mountpoint> to inspect it)
lkm4ctr: vendor_kernel: [DEBUG-KMI-EXIT] exit_fs hook #2 pid=6628 comm=insmod tracked_nsproxy=0 child_reaper=0
lkm4ctr: vendor_kernel: [DEBUG-KMI-EXIT] exit hook pre #2 pid=6628 comm=insmod tracked_nsproxy=0 pid_ns=init child_reaper=0
lkm4ctr: vendor_kernel: [DEBUG-KMI-EXIT] exit hook post #2 pid=6628 comm=insmod tracked_nsproxy=0 pid_ns=init child_reaper=0
({insmod,lsmod,grep,POSIX timer} all went through the exit hooks fine)
- Then I ran
lkm4ctr_checker(which actually callsunshare(CLONE_NEWPID),unshare(CLONE_NEWUSER), SysV IPC, mqueue, and an overlay mount). The adb/shell session died mid-run; the phone rebooted on its own within ~1 minute. - Vendor record after reboot:
# cat /proc/last_boot_reason
kernel crash Minidump [2026-11-22 10:35:16]
Crash data availability (why no stack)
/sys/fs/pstoreempty, no ramoops/console pstore configured/proc/last_kmsgdoes not exist- dumps in
mdcompress(20 MB) andmdtp_a/mdtp_b(32 MB each) are all zero bytes
So I can only report when it crashed, not the call trace. If you tell me which
diagnostic build / which instrumentation to load, or whether the lkm4ctr diagfs
(mount -t lkm4ctr diag …) can be used without touching namespaces, I can
reproduce and capture more (dmesg while it survives, resource counters, etc.).
Related issues (I read these before filing)
- #4 — "Fix insmod unknown-symbol and CFI panics on a12-5.10/a13-5.15"
- #6 — "Fix delayed CFI kernel panic on
docker exec(pid namespace lookup) on stock 6.1/6.6/6.12"
Both are the same failure family: an indirect call through a shadow_hook_resolve()-resolved
pointer (or a whole-object CFI strip) triggers Oops - CFI: ... → Kernel panic - not syncing.
Since this box has CONFIG_CFI_CLANG=y and the crash happens only once a vendored namespace /
overlayfs path is actually exercised (not at insmod), my working hypothesis is a missed
__nocfi / CFI-unsafe call site on the 5.10 arm64 (CONFIG_CFI_CLANG, non-KCFI) path —
or a CFI type-hash mismatch caused by the 5.10.236 vendor tree differing from the 5.10.252
tree this .ko was built from, even though every imported symbol resolves.
Question
- Is this 5.10.236 vendor (not pure GKI) kernel in scope? The module is built for
5.10.252-dirty, andCONFIG_CFI_CLANG=yhere — could a CFI type-hash mismatch in the vendored overlayfs/ns paths be the panic cause? - Which subsystem is most likely involved: vendored PID/user/IPC namespace creation, or the vendored overlayfs mount? (Both are exercised by the checker; I can split the test.)
- Should I try the
.kowith any module parameter to keepvendor_kerneldisabled at first load, so we can isolateshadow_hijack+ basic hooks from the namespace code? - Would a debug
.kothatpr_err()s before each CFI-sensitive indirect call help? I'm willing to bisect one syscall at a time (e.g. onlyunshare(CLONE_NEWPID)with no checker at all) — each attempt costs one reboot, so I'd like to do it once with the right instrumentation. Note this device has no pstore/ramoops, so the kernel log from the crashing boot is lost; any capturing has to happen before the panic.
Current state
Module is not installed and not loaded; device is back to normal (no boot autoload,
nothing written to /data/adb/modules). Happy to run a more controlled reproduction
(e.g. only unshare(CLONE_NEWPID) with no checker, capture dmesg until crash) if you
consider it useful.
see /data/persist_log/