syzkaller/pkg/csource
Aleksandr Nogikh 9133037195 all: integrate with mac80211_hwsim
Two virtual wireless devices are instantiated during network devices
initialization.

A new flag (-wifi) is added that controls whether these virtual wifi
devices are instantiated and configured during proc initialization.

Also, two new pseudo syscalls are added:
1. syz_80211_inject_frame(mac_addr, packet, packet_len) -- injects an
arbitrary packet into the wireless stack. It is injected as if it
originated from the device identitied by mac_addr.
2. syz_80211_join_ibss(interface_name, ssid, ssid_len, mode) --
puts a specific network interface into IBSS state and joins an IBSS
network.

Arguments of syz_80211_join_ibss:
1) interface_name -- null-terminated string that identifies
a wireless interface
2) ssid, ssid_len -- SSID of an IBSS network to join to
3) mode -- mode of syz_80211_join_ibss operation (see below)

Modes of operation:
JOIN_IBSS_NO_SCAN (0x0) -- channel scan is not performed and
syz_80211_join_ibss waits until the interface reaches IF_OPER_UP.
JOIN_IBSS_BG_SCAN (0x1) -- channel scan is performed (takes ~ 9
seconds), syz_80211_join_ibss does not await IF_OPER_UP.
JOIN_IBSS_BG_NO_SCAN (0x2) -- channel scan is not performed,
syz_80211_join_ibss does not await IF_OPER_UP.

Local testing ensured that these syscalls are indeed able to set up an
operating network and inject packets into mac80211.
2020-09-22 10:12:23 +02:00
..
build.go Get rid of "Cross" in variable names 2020-05-13 13:05:41 +02:00
common.go all: integrate with mac80211_hwsim 2020-09-22 10:12:23 +02:00
csource_test.go pkg/csource: don't test auto-generated files 2020-09-20 15:12:12 +02:00
csource.go pkg/csource: add description of the generation process 2020-08-10 15:32:40 +02:00
gen.go all: mark auto-generated files 2020-07-29 12:55:55 +02:00
generated.go all: integrate with mac80211_hwsim 2020-09-22 10:12:23 +02:00
options_test.go all: integrate with mac80211_hwsim 2020-09-22 10:12:23 +02:00
options.go all: integrate with mac80211_hwsim 2020-09-22 10:12:23 +02:00
race_test.go pkg/csource: fix test exit code 2018-05-07 20:40:44 +02:00