diff options
author | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2021-12-26 14:04:30 +0000 |
---|---|---|
committer | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2021-12-26 14:04:30 +0000 |
commit | fd26522a2593c22b09f96ff164c410d0acb2ef02 (patch) | |
tree | 0484fdba7cc198b9187bbb41f441e407bfe7dcae /sys | |
parent | e56aa27ecfe5f8b949623540c3b1a363b259305d (diff) |
DIOCHANGERRULE ioctl must set pointer to ruleset in rule it inserts.
Reported-by: syzbot+7718c5f69c595f76b298@syzkaller.appspotmail.com
OK bluhm@, OK jmatthew@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 9293253ea2a..a7e6641ae91 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.368 2021/12/26 01:00:32 sashan Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.369 2021/12/26 14:04:29 sashan Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1646,6 +1646,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) ruleset->rules.active.ptr, oldrule, newrule, entries); ruleset->rules.active.rcount++; + newrule->ruleset = ruleset; } nr = 0; |