diff options
author | 2020-12-16 18:00:44 +0000 | |
---|---|---|
committer | 2020-12-16 18:00:44 +0000 | |
commit | 39c2a1337a9413565cfbd66e4bd09ea8181b627e (patch) | |
tree | 920c3133e2c2bf4f3e203baf9f4d0c1e9f2475f5 /sys/dev/softraid.c | |
parent | When debugging tests, it is useful to see the target name and which (diff) | |
download | wireguard-openbsd-39c2a1337a9413565cfbd66e4bd09ea8181b627e.tar.xz wireguard-openbsd-39c2a1337a9413565cfbd66e4bd09ea8181b627e.zip |
Reject rules with invalid port ranges
Ranges where the left boundary is bigger than the right one are always bogus
as they work like `port any' (`port 34<>12' means "all ports") or in way
that inverts the rule's action (`pass ... port 34:12' means "pass no port at
all").
Add checks for all ranges and invalidate those that yield no or all ports.
For this to work on redirections, make pfctl(8) pass the range's type,
otherwise boundary including ranges are not detected as such; that is to
say, `struct pf_pool's `port_op' member was unused in the kernel so far.
`rdr-to' rules with invalid ranges could panic the kernel when hit.
Reported-by: syzbot+9c309db201f06e39a8ba@syzkaller.appspotmail.com
OK sashan
Diffstat (limited to 'sys/dev/softraid.c')
0 files changed, 0 insertions, 0 deletions