Re: [PATCH net-next-2.6] filter: add a security check at install time

Changli Gao
2010-12-02T11:30:14Z

On Thu, Dec 2, 2010 at 7:15 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> Their scratch memory is not on stack but part of the filter, so no
> security problem (You can only read previous values of scratch registers
> written by your own filter on handling a previous packet.)
>

The code I checked is the newest in SVN. The scratch memory is really on stack.

/*
* Execute the filter program starting at pc on the packet p
* wirelen is the length of the original packet
* buflen is the amount of data present
*/
u_int
bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen)
{
u_int32_t A = 0, X = 0;
bpf_u_int32 k;
u_int32_t mem[BPF_MEMWORDS];

--
Regards,
Changli Gao(xiaosuo@gmail.com)