public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
130016bc5c524a3cb0c10b1ab868eac2bafacec2 blob 652 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
# fuzzing/fuzz-setup.sh - Rootless network namespace for AFL++ fuzzing
#
# Creates a user + network namespace (no root required) with AnyIP
# routing so the test server intercepts all outbound TCP connections
# from passt, regardless of destination IP/port or address family.
#
# Usage:
#   fuzzing/fuzz-setup.sh -- afl-fuzz [opts] -- ./passt.fuzz --foreground
#
# Copyright Red Hat
# Author: Anshu Kumari <anskuma@redhat.com>

exec unshare --map-root-user --net -- sh -c '
	set -e
	ip link set lo up
	ip route add local 0.0.0.0/0 dev lo
	ip -6 route add local ::/0 dev lo

	exec "$@"
' _ "$@"
debug log:

solving 130016bc ...
found 130016bc in https://archives.passt.top/passt-dev/20260928051727.2251281-8-anskuma@redhat.com/

applying [1/1] https://archives.passt.top/passt-dev/20260928051727.2251281-8-anskuma@redhat.com/
diff --git a/fuzzing/fuzz-setup.sh b/fuzzing/fuzz-setup.sh
new file mode 100755
index 00000000..130016bc

Checking patch fuzzing/fuzz-setup.sh...
Applied patch fuzzing/fuzz-setup.sh cleanly.

index at:
100755 130016bc5c524a3cb0c10b1ab868eac2bafacec2	fuzzing/fuzz-setup.sh

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).