Exploit databaseDownload repository ZIP
GH-fe45a0a486d27c36aa80e2c232873fd2
khoatran107/cve-2025-21756
Sources for CVE-2025-21756
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files35
khoatran107/cve-2025-21756Revision 13a3614dbba0
- backups/
- crashes/
- failures/
- test_unix/
- theori/
- usage/
- .gitignore
- README.md
- compile.sh
- entrybleed.c
- entrybleed.h
- exploit.c
- extract-image.sh
- final.gif
- flag
- local_runner.sh
- local_runner_customized.sh
- packet_send.c
- pipes.c
- prefetch_old.c
- qemu_v3.sh
- qemu_v3_customized.sh
- qemu_v3_customized.sh.bak
- qwerty_entrybleed.h
- run.sh
- run.sh.old
- script.gdb
- tap_device.c
- tcp_send_rcvq.c
- test copy.c
- test.c
- test.c.bak_before_change_vsock
- test_xattr.c
- trigger.c
- trigger2.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
tap_device.c
C · 561 bytes#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <linux/if_tun.h>
#include <sys/ioctl.h>
#include <net/if.h>
int tun_alloc(const char *dev) {
struct ifreq ifr;
int fd = open("/dev/net/tun", O_RDWR);
memset(&ifr, 0, sizeof(ifr));
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
strncpy(ifr.ifr_name, dev, IFNAMSIZ);
ioctl(fd, TUNSETIFF, &ifr);
return fd;
}
int main() {
int fd = tun_alloc("tap0");
char buffer[1500] = "Hello from userspace";
write(fd, buffer, strlen(buffer));
return 0;
}