OpenCloudOS-Kernel/net/bpfilter
Christoph Hellwig 4f010246b4 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: 6955a76fbc ("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
2020-07-31 01:07:32 +02:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kconfig bpfilter: document build requirements for bpfilter_umh 2020-05-26 00:03:16 +09:00
Makefile bpfilter: use 'userprogs' syntax to build bpfilter_umh 2020-05-17 18:52:01 +09:00
bpfilter_kern.c net/bpfilter: Initialize pos in __bpfilter_process_sockopt 2020-07-31 01:07:32 +02:00
bpfilter_umh_blob.S net: bpfilter: change section name of bpfilter UMH blob. 2019-01-16 15:46:46 -08:00
main.c net/bpfilter: remove superfluous testing message 2020-03-31 10:07:51 -07:00
msgfmt.h net: add skeleton of bpfilter kernel module 2018-05-23 13:23:40 -04:00