diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2022-09-28 13:17:51 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-09-29 13:44:19 +0200 |
| commit | 21d737fbf9bad3f2a9190bc31212f29edbfcaeb3 (patch) | |
| tree | 3331ad8c04eac8cf0c13bb9aa448dbdb76693ac6 /sys/openbsd | |
| parent | d9da3ac6347057f9742c199502651572f46f9bf0 (diff) | |
sys: control structural changes during neutralization
Ideally, we should properly support the already existing fix flag to
distinguish between fixing and checking, but for now at least let it
control whether structural changes are to be made.
Otherwise we get into trouble while hint-mutating syz_mount_image calls,
because we iterate over all call arguments and (possibly) remove them at
the same time. It leads to `bad group arg size %v, should be <= %v for
%#v type %#v` errors.
Diffstat (limited to 'sys/openbsd')
| -rw-r--r-- | sys/openbsd/init.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/openbsd/init.go b/sys/openbsd/init.go index 497291244..2a2aeae4c 100644 --- a/sys/openbsd/init.go +++ b/sys/openbsd/init.go @@ -82,7 +82,7 @@ func isExecutorFd(dev uint64) bool { return major == devFdMajor && minor >= 200 } -func (arch *arch) neutralize(c *prog.Call) { +func (arch *arch) neutralize(c *prog.Call, fixStructure bool) error { argStart := 1 switch c.Meta.CallName { case "chflagsat": @@ -150,8 +150,9 @@ func (arch *arch) neutralize(c *prog.Call) { case "sysctl": arch.neutralizeSysctl(c) default: - arch.unix.Neutralize(c) + return arch.unix.Neutralize(c, fixStructure) } + return nil } func (arch *arch) neutralizeClockSettime(c *prog.Call) { |
