In commit 42b65fd18057d64410a0519962cd0650c762c99f there
is a typo: we need to copy the complete filter chain
not only first number.

https://jira.sw.ru/browse/PSBM-55593

CC: Andrey Vagin <[email protected]>
Signed-off-by: Cyrill Gorcunov <[email protected]>
---

I am continue investigating the problem since tests
are not yet passed but this fix may be applied independently.

 kernel/seccomp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-pcs7.git/kernel/seccomp.c
===================================================================
--- linux-pcs7.git.orig/kernel/seccomp.c
+++ linux-pcs7.git/kernel/seccomp.c
@@ -566,7 +566,7 @@ long seccomp_get_filter(struct task_stru
        get_seccomp_filter(task);
        spin_unlock_irq(&task->sighand->siglock);
 
-       if (copy_to_user(data, filter->insns, filter->len))
+       if (copy_to_user(data, filter->insns, filter->len * 
sizeof(filter->insns[0])))
                ret = -EFAULT;
 
        put_seccomp_filter(task);
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to