Date: Sun, 3 May 2020 16:09:35 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360609 - head/sys/netpfil/pf Message-ID: <202005031609.043G9ZbT089444@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Sun May 3 16:09:35 2020 New Revision: 360609 URL: https://svnweb.freebsd.org/changeset/base/360609 Log: 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@syzkaller.appspotmail.com Reviewed by: melifaro (previous version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24538 Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sun May 3 16:06:23 2020 (r360608) +++ head/sys/netpfil/pf/pf_ioctl.c Sun May 3 16:09:35 2020 (r360609) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005031609.043G9ZbT089444>