svn commit: r346320 - head/tests/sys/netpfil/pf/ioctl
Kristof Provost
kp at FreeBSD.org
Tue Sep 3 14:07:53 UTC 2019
Author: kp
Date: Wed Apr 17 16:45:35 2019
New Revision: 346320
URL: https://svnweb.freebsd.org/changeset/base/346320
Log:
pf tests: Try to provoke the panic with invalid DIOCRSETTFLAGS
There was an issue with copyin() on DIOCRSETTFLAGS, which would panic if
pfrio_buffer was NULL.
Test for the issue fixed in r346319.
MFC after: 1 week
Event: Aberdeen hackathon 2019
Modified:
head/tests/sys/netpfil/pf/ioctl/validation.c
Modified: head/tests/sys/netpfil/pf/ioctl/validation.c
==============================================================================
--- head/tests/sys/netpfil/pf/ioctl/validation.c Wed Apr 17 16:42:54 2019 (r346319)
+++ head/tests/sys/netpfil/pf/ioctl/validation.c Wed Apr 17 16:45:35 2019 (r346320)
@@ -305,6 +305,11 @@ ATF_TC_BODY(settflags, tc)
io.pfrio_size = 1 << 28;
if (ioctl(dev, DIOCRSETTFLAGS, &io) != 0)
atf_tc_fail("Request with size 1 << 24 failed");
+
+ /* NULL buffer */
+ io.pfrio_buffer = NULL;
+ if (ioctl(dev, DIOCRSETTFLAGS, &io) != -1)
+ atf_tc_fail("Request with NULL buffer succeeded");
}
ATF_TC_CLEANUP(settflags, tc)
More information about the svn-src-all
mailing list