net: filter: initialize A and X registers
authorAlexei Starovoitov <ast@plumgrid.com>
Wed, 23 Apr 2014 03:18:57 +0000 (20:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Apr 2014 19:34:41 +0000 (15:34 -0400)
commit83d5b7ef99c9f05e87333b334a638de1264ab8e4
treef95ec9cdb441ecfcd32cafe96c1d30a865c9ba35
parentc06cbcb6052edd8f4ee00d65f874b26404ac8f96
net: filter: initialize A and X registers

exisiting BPF verifier allows uninitialized access to registers,
'ret A' is considered to be a valid filter.
So initialize A and X to zero to prevent leaking kernel memory
In the future BPF verifier will be rejecting such filters

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Cc: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c