From 40effc6feef00a65aa071869c492b2955f7eb6c6 Mon Sep 17 00:00:00 2001 From: Nick Chan Date: Thu, 13 Jun 2024 15:27:50 +0800 Subject: [PATCH] sep: fixed bpr bypass --- src/drivers/sep/sep.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/drivers/sep/sep.c b/src/drivers/sep/sep.c index 3281e5f4..0caf9458 100644 --- a/src/drivers/sep/sep.c +++ b/src/drivers/sep/sep.c @@ -104,6 +104,11 @@ void sepfw_kpf(void* sepfw_bytes, size_t sepfw_size) { fiprintf(stderr, "patched out bpr check\n"); #endif break; + } else if (insn_stream[i] == 0xe1910200) { // orrs r0, r1, r0, lsl 4 + insn_stream[i] = 0xe1500000; // cmp r0, r0 +#ifdef SEP_DEBUG + fiprintf(stderr, "patched out bpr check\n"); +#endif } } }