From e4f103c49590d5ff0c7e416ade15a99f54029f8d Mon Sep 17 00:00:00 2001 From: Anton Lindqvist Date: Fri, 26 Feb 2021 09:08:40 +0100 Subject: sys/openbsd: neutralize sysctl kern.maxfiles Yet another root only knob that can cause the syz-execprog process to run out of resources[1]. [1] https://syzkaller.appspot.com/bug?id=08745ec898fac9de9164bcc4d03bf62a078f56ab --- sys/openbsd/init_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/openbsd/init_test.go') diff --git a/sys/openbsd/init_test.go b/sys/openbsd/init_test.go index d97c5e49e..c439de565 100644 --- a/sys/openbsd/init_test.go +++ b/sys/openbsd/init_test.go @@ -93,6 +93,11 @@ func TestNeutralize(t *testing.T) { In: `sysctl$kern(&(0x7f0000000300)={0x1, 0x6}, 0x2, 0x0, 0x0, &(0x7f0000000300)="ff0380c5", 0x4)`, Out: `sysctl$kern(&(0x7f0000000300)={0x0}, 0x0, 0x0, 0x0, &(0x7f0000000300)="ff0380c5", 0x4)`, }, + { + // Test for sysctl kern.maxfiles. + In: `sysctl$kern(&(0x7f0000000300)={0x1, 0x7}, 0x2, 0x0, 0x0, &(0x7f0000000300)="ff0380c5", 0x4)`, + Out: `sysctl$kern(&(0x7f0000000300)={0x0}, 0x0, 0x0, 0x0, &(0x7f0000000300)="ff0380c5", 0x4)`, + }, { // Test for sysctl kern.maxthread. In: `sysctl$kern(&(0x7f0000000300)={0x1, 0x19}, 0x2, 0x0, 0x0, &(0x7f0000000300)="ff0380c5", 0x4)`, -- cgit mrf-deployment