Skip to content

Commit

Permalink
Update repro.sh to handle io_uring arg
Browse files Browse the repository at this point in the history
  • Loading branch information
chanijindal1 committed Dec 5, 2024
1 parent ab79a48 commit dbd6959
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion kernelctf/repro/repro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ touch $QEMU_TXT
START_TIME=$(date +%s)

CMDLINE="console=ttyS0 root=/dev/vda1 rootfstype=ext4 rootflags=discard ro init=/init hostname=repro"
if [[ "$(echo $EXPLOIT_INFO | jq -e '.requires_separate_kaslr_leak')" == true ]]; then CMDLINE="$CMDLINE nokaslr -- kaslr_leak=1"; fi

if [[ "$(echo $EXPLOIT_INFO | jq -e '.requires_separate_kaslr_leak')" == true ]]; then
CMDLINE="$CMDLINE nokaslr -- kaslr_leak=1"
fi

# Check if the exploit uses io_uring
if ! echo $EXPLOIT_INFO | jq -e '.uses | index("io_uring")' > /dev/null 2>&1; then
CMDLINE="$CMDLINE sysctl.io_uring_disabled=2"
fi

echo $CMDLINE

expect -c '
set timeout -1
Expand Down

0 comments on commit dbd6959

Please sign in to comment.