summaryrefslogtreecommitdiff
path: root/net/bpfilter
diff options
context:
space:
mode:
Diffstat (limited to 'net/bpfilter')
-rw-r--r--net/bpfilter/bpfilter_kern.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bpfilter/bpfilter_kern.c b/net/bpfilter/bpfilter_kern.c
index 78d561f2c54d..00540457e5f4 100644
--- a/net/bpfilter/bpfilter_kern.c
+++ b/net/bpfilter/bpfilter_kern.c
@@ -70,6 +70,10 @@ static int bpfilter_process_sockopt(struct sock *sk, int optname,
.addr = (uintptr_t)optval,
.len = optlen,
};
+ if (uaccess_kernel()) {
+ pr_err("kernel access not supported\n");
+ return -EFAULT;
+ }
return bpfilter_send_req(&req);
}