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
This commit is contained in:
parent
f5e0d9fcb4
commit
246e18b224
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346320
@ -305,6 +305,11 @@ ATF_TC_BODY(settflags, tc)
|
|||||||
io.pfrio_size = 1 << 28;
|
io.pfrio_size = 1 << 28;
|
||||||
if (ioctl(dev, DIOCRSETTFLAGS, &io) != 0)
|
if (ioctl(dev, DIOCRSETTFLAGS, &io) != 0)
|
||||||
atf_tc_fail("Request with size 1 << 24 failed");
|
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)
|
ATF_TC_CLEANUP(settflags, tc)
|
||||||
|
Loading…
Reference in New Issue
Block a user