Crusaders-of-Rust / CVE-2022-0185

CVE-2022-0185
366 stars 56 forks source link

Multiple warning #2

Open anonymousgalaxylord opened 2 years ago

anonymousgalaxylord commented 2 years ago

Hi,

I am getting issues while doing make fuse or kctf.

make fuse ` gcc -no-pie -static exploit_fuse.c fakefuse.c util.c -I./libfuse libfuse3.a -o exploit -masm=intel -pthread exploit_fuse.c: In function ‘modprobe_hax’: exploit_fuse.c:227:5: warning: null argument where non-null required (argument 2) [-Wnonnull] 227 execve(modprobe_trigger, NULL, NULL); ^~ strip exploit **make kctf** gcc -no-pie -static exploit_kctf.c util.c -o exploit -masm=intel -pthread exploit_kctf.c:379:24: warning: return type defaults to ‘int’ [-Wimplicit-int] 379 attribute((naked)) win() ^~~ exploit_kctf.c: In function ‘main’: exploit_kctf.c:621:25: warning: format ‘%p’ expects argument of type ‘void *’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=] 621 printf("[*] kbase: %p\n", kbase); ~^ ~
uint64_t {aka long unsigned int}
void *
%ld
exploit_kctf.c:640:42: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=] 640 printf("[*] kmalloc 1024 chunk: 0x%llx\n", kmalloc_1024); ~^ ~~~~~~
uint64_t {aka long unsigned int}
long long unsigned int
%lx
exploit_kctf.c:641:41: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=] 641 printf("[*] kmalloc 512 chunk: 0x%llx\n", kmalloc_512); ~^ ~~~~~
uint64_t {aka long unsigned int}
long long unsigned int
%lx

strip exploit `

After getting the exploit with warnings, it is not exploiting the kernel. Could you please help me with that?

Thanks in advance; looking forward to quick fixes.

chop0 commented 2 years ago

it's not the warnings; it's probably that the kernel is patched

10maurycy10 commented 2 years ago

it's not the warnings; it's probably that the kernel is patched

Basically all non dead distros have patched this.