Page MenuHomeFreeBSD

pf: Improve DIOCADDRULE validation
ClosedPublic

Authored by kp on Apr 22 2020, 7:11 PM.
Tags
None
Referenced Files
F164295818: D24538.id.diff
Thu, Jul 30, 12:18 PM
Unknown Object (File)
Sun, Jul 26, 2:55 AM
Unknown Object (File)
Fri, Jul 24, 11:10 PM
Unknown Object (File)
Fri, Jul 24, 6:11 PM
Unknown Object (File)
Thu, Jul 23, 12:53 AM
Unknown Object (File)
Sun, Jul 19, 8:29 PM
Unknown Object (File)
Tue, Jul 14, 8:44 PM
Unknown Object (File)
Fri, Jul 10, 6:08 AM

Details

Summary

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

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30840
Build 28559: arc lint + arc unit

Event Timeline

LGTM, please see some comments inline.

sys/netpfil/pf/pf_ioctl.c
1578

Maybe it's worth considering doing input validation before WLOCK/etc ?

1610

Nit: worth documenting why we don't want dyn to be set by userland?

This revision is now accepted and ready to land.Apr 29 2020, 7:12 PM

Move the check outside of the lock.

This revision now requires review to proceed.May 1 2020, 12:54 PM
This revision was not accepted when it landed; it landed in state Needs Review.May 3 2020, 4:09 PM
This revision was automatically updated to reflect the committed changes.