diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2020-04-01 19:37:07 +0200 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@gmail.com> | 2020-04-03 12:42:06 +0200 |
| commit | 09ff5abc02a0e38bb275a91380fc03d6cd0d47a5 (patch) | |
| tree | a39602cd91fbad39b6e10a8455b58d7f59831965 /pkg/host/features_linux.go | |
| parent | ca1beb07f02e67ba2faa81a5b56b061111f818f3 (diff) | |
csource, executor: add usb emulation feature
The feature gets enabled when /dev/raw-gadget is present and accessible.
With this feature enabled, executor will do chmod 0666 /dev/raw-gadget on
startup, which makes it possible to do USB fuzzing in setuid and namespace
sandboxes. There should be no backwards compatibility issues with syz
reproducers that don't explicitly enable this feature, as they currently only
work in none sandbox.
Diffstat (limited to 'pkg/host/features_linux.go')
| -rw-r--r-- | pkg/host/features_linux.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/host/features_linux.go b/pkg/host/features_linux.go index 7b4b7b243..8c6f63004 100644 --- a/pkg/host/features_linux.go +++ b/pkg/host/features_linux.go @@ -27,6 +27,7 @@ func init() { checkFeature[FeatureNetDevices] = unconditionallyEnabled checkFeature[FeatureKCSAN] = checkKCSAN checkFeature[FeatureDevlinkPCI] = checkDevlinkPCI + checkFeature[FeatureUSBEmulation] = checkUSBEmulation } func checkCoverage() string { @@ -183,7 +184,7 @@ func checkNetInjection() string { return "" } -func checkUSBInjection() string { +func checkUSBEmulation() string { if err := osutil.IsAccessible("/dev/raw-gadget"); err != nil { return err.Error() } |
