Markakd / bad_io_uring

Android kernel exploitation for CVE-2022-20409
156 stars 24 forks source link

ls: .: Permission denied #4

Open stevejubs opened 6 months ago

stevejubs commented 6 months ago

Thank you for the exploit. However, the root shell returns 'Permission denied' on Pixel 6. I need to know the root cause of the problem.

Screenshot 2567-03-19 at 01 23 14
ye4ah4 commented 5 months ago

Hi, I encountered the same issue on the Samsung S22 and also failed to find the root cause or a solution. 01

ye4ah4 commented 5 months ago

Hi,

I used a root shell obtained with Magisk to check the process capabilities: r0q:/ # cat /proc/self/status | grep Cap CapInh: 0000000000000000 CapPrm: 000001ffffffffff CapEff: 000001ffffffffff CapBnd: 000001ffffffffff CapAmb: 0000000000000000

But with the root shell obtained using the exploit, the process capabilities are: r0q:/data/local/tmp # cat /proc/self/status | grep Cap CapInh: 0000000000000000 CapPrm: 00000000000000c0 CapEff: 00000000000000c0 CapBnd: 00000000000000c0 CapAmb: 0000000000000000

Could this be the reason? Thank you. I am attempting to modify the capabilities of the exploit to be similar to Magisk's capabilities, but I am not very familiar with the code, and I haven't succeeded in making the changes yet.

Best Wishes

ye4ah4 commented 5 months ago

I tried to modify the cap as follows, but it failed, saying that the permissions were insufficient.

--- a/exp_s22.c +++ b/exp_s22.c @@ -38,6 +38,7 @@

include <sys/socket.h>

+#include <sys/capability.h>

define MAX_PIPE_NUM 0x400

define MAX_256_PIPE 0x400

void exploit(void) { setuid(0); seteuid(0);

when exp cred is overwritten cap strerror(errno) Operation not permitted cap now uid/gid: 0/0