aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel/bpf
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-30 18:09:00 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2020-07-31 01:07:32 +0200
commit4f010246b4087ab931b060481014ec110e6a8a46 (patch)
treee454d2a5f3dad27c81eaaba95127c681cdb6cce4 /kernel/bpf
parentselftests/bpf: Extend map-in-map selftest to detect memory leaks (diff)
downloadwireguard-linux-4f010246b4087ab931b060481014ec110e6a8a46.tar.xz
wireguard-linux-4f010246b4087ab931b060481014ec110e6a8a46.zip
net/bpfilter: Initialize pos in __bpfilter_process_sockopt
__bpfilter_process_sockopt never initialized the pos variable passed to the pipe write. This has been mostly harmless in the past as pipes ignore the offset, but the switch to kernel_write now verified the position, which can lead to a failure depending on the exact stack initialization pattern. Initialize the variable to zero to make rw_verify_area happy. Fixes: 6955a76fbcd5 ("bpfilter: switch to kernel_write") Reported-by: Christian Brauner <christian.brauner@ubuntu.com> Reported-by: Rodrigo Madera <rodrigo.madera@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Tested-by: Rodrigo Madera <rodrigo.madera@gmail.com> Tested-by: Christian Brauner <christian.brauner@ubuntu.com> Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com> Link: https://lore.kernel.org/bpf/20200730160900.187157-1-hch@lst.de
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions