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 <>
Reported-by: Rodrigo Madera <>
Signed-off-by: Christoph Hellwig <>
Signed-off-by: Daniel Borkmann <>
Tested-by: Rodrigo Madera <>
Tested-by: Christian Brauner <>
Reviewed-by: Christian Brauner <>
1 file changed