check pf rule "set prio" values consistently.
authordlg <dlg@openbsd.org>
Wed, 16 Feb 2022 04:25:34 +0000 (04:25 +0000)
committerdlg <dlg@openbsd.org>
Wed, 16 Feb 2022 04:25:34 +0000 (04:25 +0000)
commit2960c8affbaf508f693eb4835f38c377df7492b7
treeaa2caaba6c10f7e2902f977be67bd2ebe812db2b
parent56d79bccdaec88aac4168d33b685fcfe4245b92f
check pf rule "set prio" values consistently.

consistently means we do the check in pf_rule_copyin() so both
DIOCADDRULE and DIOCCHANGERULE have the prio values checked. this in
turn prevents invalid prio values getting set on a rule via
DIOCCHANGERULE.

this was caught by a kassert in the ifq priq code firing.

Reported-by: syzbot+a8f8e24a44b441e71d93@syzkaller.appspotmail.com
ok sashan@
sys/net/pf_ioctl.c