RKP Hypervisor Vulnerability
Samsung phones include a security hypervisor called RKP (Real-time Kernel Protection), running in EL2. This hypervisor is meant to ensure that the HLOS kernel running in EL1 remains protected from exploits and aims to prevent privilege escalation attacks by 'shielding' certain data structures within the hypervisor. However, RKP provides two commands which produce a value using the 64-bit hypervisor key, namely: cfp_ropp_new_key (RKP command 0x91) and cfp_ropp_new_key_reenc (RKP command 0x92). Both of these commands convert the given virtual address from the kernel VAS to a physical address, but fail to verify the resulting address either via 'physmap', or by checking that the given address does not reside in the physical address range of RKP itself. This means an attacker can issue these RKP calls in order to corrupt RKP memory or write to regions which are S2-protected by EL2.