svn commit: r360868 - stable/12/sys/netpfil/pf
Kristof Provost
kp at FreeBSD.org
Sun May 10 09:50:45 UTC 2020
Author: kp
Date: Sun May 10 09:50:44 2020
New Revision: 360868
URL: https://svnweb.freebsd.org/changeset/base/360868
Log:
MFC r360609:
pf: Improve DIOCADDRULE validation
We expect the addrwrap.p.dyn value to be set to NULL (and assert such),
but do not verify it on input.
Reported-by: syzbot+936a89182e7d8f927de1 at syzkaller.appspotmail.com
Modified:
stable/12/sys/netpfil/pf/pf_ioctl.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- stable/12/sys/netpfil/pf/pf_ioctl.c Sun May 10 09:50:43 2020 (r360867)
+++ stable/12/sys/netpfil/pf/pf_ioctl.c Sun May 10 09:50:44 2020 (r360868)
@@ -1556,6 +1556,11 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, in
error = EINVAL;
break;
}
+ if (pr->rule.src.addr.p.dyn != NULL ||
+ pr->rule.dst.addr.p.dyn != NULL) {
+ error = EINVAL;
+ break;
+ }
#ifndef INET
if (pr->rule.af == AF_INET) {
error = EAFNOSUPPORT;
More information about the svn-src-all
mailing list