mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
UPSTREAM: 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>
Change-Id: I8881e10460784cece6b2a2338c1b418adf99965e
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
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
This commit is contained in:
parent
b644b034eb
commit
b37692ea84
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ static void __stop_umh(void)
|
|||
static int bpfilter_send_req(struct mbox_request *req)
|
||||
{
|
||||
struct mbox_reply reply;
|
||||
loff_t pos;
|
||||
loff_t pos = 0;
|
||||
ssize_t n;
|
||||
|
||||
if (!bpfilter_ops.info.tgid)
|
||||
|
|
|
|||
Loading…
Reference in a new issue