struct sock_fprog includes a pointer to the user filter. In order to preserve such user pointers in PCuABI, copy_from_user_with_ptr() must be used.
Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com --- kernel/seccomp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 2f52ea7fa34a..12faa617c8da 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -703,7 +703,7 @@ seccomp_prepare_user_filter(const char __user *user_filter) fprog.filter = compat_ptr(fprog32.filter); } else /* falls through to the if below. */ #endif - if (copy_from_user(&fprog, user_filter, sizeof(fprog))) + if (copy_from_user_with_ptr(&fprog, user_filter, sizeof(fprog))) goto out; filter = seccomp_prepare_filter(&fprog); out: