Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 May 2020 09:50:43 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r360867 - stable/11/sys/netpfil/pf
Message-ID:  <202005100950.04A9ohX8013628@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Sun May 10 09:50:43 2020
New Revision: 360867
URL: https://svnweb.freebsd.org/changeset/base/360867

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@syzkaller.appspotmail.com

Modified:
  stable/11/sys/netpfil/pf/pf_ioctl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- stable/11/sys/netpfil/pf/pf_ioctl.c	Sun May 10 09:34:48 2020	(r360866)
+++ stable/11/sys/netpfil/pf/pf_ioctl.c	Sun May 10 09:50:43 2020	(r360867)
@@ -1152,6 +1152,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?202005100950.04A9ohX8013628>