From 6dd6b37bc78fd2045096b6414fcfc42a7a943cf2 Mon Sep 17 00:00:00 2001 From: Lorenz Bauer Date: Thu, 11 Jun 2020 12:00:40 +0100 Subject: sys/linux: update BPF_MAP_UPDATE_ELEM to enable more thorough sockmap fuzzing sockmap and sockhash expect the value of the update syscall to be a file descriptor for a UDP or TCP socket. Add this knowledge by introducing a separate union for map update values. --- sys/linux/bpf.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sys/linux') diff --git a/sys/linux/bpf.txt b/sys/linux/bpf.txt index 9fef31e31..981bf5036 100644 --- a/sys/linux/bpf.txt +++ b/sys/linux/bpf.txt @@ -96,10 +96,18 @@ bpf_map_lookup_arg { flags flags[bpf_lookup_flags, int64] } +bpf_map_update_val [ + buf array[int8] + udp sock_udp + udp6 sock_udp6 + tcp sock_tcp + tcp6 sock_tcp6 +] [varlen] + bpf_map_update_arg { map fd_bpf_map key ptr64[in, array[int8]] - val ptr64[in, array[int8]] + val ptr64[in, bpf_map_update_val] flags flags[bpf_map_flags, int64] } -- cgit mrf-deployment