cvs commit: src/sys/net bpf.c bpf_filter.c

Sepherosa Ziehau sephe at
Wed Jan 2 04:31:00 PST 2008

sephe       2008/01/02 04:30:34 PST

DragonFly src repository

  Modified files:
    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 <guy at>
      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

More information about the Commits mailing list