pf tests: pass NULL buffer to DIOCRCLRTSTATS

As discovered by syzcaller this used to provoke panics.

MFC after:	1 week
This commit is contained in:
Kristof Provost 2021-01-13 19:41:07 +01:00
parent ea36212bf5
commit 44117554b1

View File

@ -265,6 +265,11 @@ ATF_TC_BODY(clrtstats, tc)
io.pfrio_size = 1 << 24;
if (ioctl(dev, DIOCRCLRTSTATS, &io) != 0)
atf_tc_fail("Request with size 1 << 24 failed");
io.pfrio_size = sizeof(tbl);
io.pfrio_buffer = NULL;
if (ioctl(dev, DIOCRCLRTSTATS, &io) == 0)
atf_tc_fail("Request with NULL buffer succeeded");
}
ATF_TC_CLEANUP(clrtstats, tc)