Page MenuHomeFreeBSD

pf: Improve DIOCADDRULE validation
ClosedPublic

Authored by kp on Apr 22 2020, 7:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 1, 3:32 PM
Unknown Object (File)
Wed, Jan 29, 3:45 AM
Unknown Object (File)
Dec 20 2024, 1:32 AM
Unknown Object (File)
Dec 9 2024, 6:52 PM
Unknown Object (File)
Nov 26 2024, 3:02 PM
Unknown Object (File)
Nov 25 2024, 5:28 AM
Unknown Object (File)
Nov 1 2024, 2:50 PM
Unknown Object (File)
Oct 1 2024, 9:23 PM

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.