This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Reproducer for ATM signaling sigd_send() vulnerability | |
| * | |
| * Bug: net/atm/signaling.c sigd_send() uses user-controlled | |
| * msg->vcc pointer without validation. | |
| * | |
| * Requires: root (CAP_NET_ADMIN) and CONFIG_ATM enabled kernel | |
| */ | |
| #include <stdio.h> | |
| #include <string.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Test program for zswpraw per-cgroup stat. | |
| * Pre-compress data with zstd so kernel zswap can't compress further. | |
| * Dep: apt-get install libzstd-dev | |
| * Build: gcc -o test_zswpraw test_zswpraw.c -lzstd | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * caif_deadloop_repro.c - Reproduce handle_tx() infinite loop in caif_serial | |
| * Kernel config: | |
| * CONFIG_CAIF=y | |
| * CONFIG_CAIF_TTY=y | |
| * Root cause: Using a TTY with PORT_UNKNOWN type (e.g., /dev/ttyS3 in QEMU) | |
| * causes uart_write_room() to return 1 but uart_write() to return 0, | |
| * because xmit_buf is never allocated for PORT_UNKNOWN ports. | |
| * | |
| * Compile: gcc -o caif_deadloop_repro caif_deadloop_repro.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * caif_uaf_trigger.c - Trigger caif_serial UAF bug | |
| * | |
| * This program opens a tty, sets N_CAIF line discipline, | |
| * then sends packets to the caif device while closing the tty | |
| * to trigger the use-after-free bug. | |
| * | |
| * Compile: gcc -o caif_uaf_trigger caif_uaf_trigger.c -lpthread | |
| * Run as root: ./caif_uaf_trigger | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * ip_rt_bug race condition reproducer | |
| * | |
| * Requires kernel with mdelay(2000) in icmp_route_lookup before ip_route_input. | |
| * | |
| * Race scenario: | |
| * 1. Send packet with src=172.20.20.1 (not local), dst=172.30.0.1 | |
| * 2. Malformed IP option triggers icmp_send -> icmp_route_lookup | |
| * 3. First xfrm_lookup returns -EPERM (block policy), enters reverse path | |
| * 4. Kernel delays 2s before ip_route_input |