Page MenuHomeFreeBSD

pf: Improve DIOCADDRULE validation
ClosedPublic

Authored by kp on Apr 22 2020, 7:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 31, 7:18 AM
Unknown Object (File)
Thu, Oct 23, 2:26 PM
Unknown Object (File)
Tue, Oct 21, 8:50 PM
Unknown Object (File)
Tue, Oct 21, 6:59 PM
Unknown Object (File)
Tue, Oct 21, 6:21 PM
Unknown Object (File)
Tue, Oct 21, 6:06 PM
Unknown Object (File)
Tue, Oct 21, 6:32 AM
Unknown Object (File)
Mon, Oct 20, 4:57 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 30669
Build 28404: arc lint + arc unit

Event Timeline

LGTM, please see some comments inline.

sys/netpfil/pf/pf_ioctl.c
1573

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

1605

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.