Clear the filter memory area before using it. Leaving it uninitialized may
leak previous kernel stack contents through a malicioius BPF filter. PR: kern/158880 Submitted by: Guy Harris Obtained from: OpenBSD MFC after: 1 week
This commit is contained in:
parent
64315b936e
commit
f3103cdbe2
@ -177,6 +177,8 @@ bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen)
|
||||
bpf_u_int32 k;
|
||||
u_int32_t mem[BPF_MEMWORDS];
|
||||
|
||||
bzero(mem, sizeof(mem));
|
||||
|
||||
if (pc == NULL)
|
||||
/*
|
||||
* No filter means accept all.
|
||||
|
Loading…
x
Reference in New Issue
Block a user