DragonFly commits List (threaded) for 2008-01
cvs commit: src/sys/net bpf.c bpf_filter.c
sephe 2008/01/02 04:30:34 PST
DragonFly src repository
sys/net bpf.c bpf_filter.c
Add more sanity checks in bpf_validate():
- BPF programs with no instructions or with more than BPF_MAXINSNS
- BPF_STX and BPF_LDX|BPF_MEM instructions that have out-of-range offsets
(which could be made to fetch or store into arbitrary memory locations).
- BPF_DIV instructions with a constant 0 divisor (that's a check also done
at run time).
Submitted-by: Guy Harris <email@example.com>
OpenBSD (with additional comments and modification from the submitter)
Revision Changes Path
1.43 +1 -1 src/sys/net/bpf.c
1.10 +103 -25 src/sys/net/bpf_filter.c