seccomp: Remove bogus __user annotations
PATCH v2 1/1 seccomp: Remove bogus __user annotations
Buffers that are passed to read_actions_logged() and write_actions_logged() are in kernel memory; the sysctl core takes care of copying from/to userspace.
Fixes 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler")
Reviewed-by Tyler Hicks <[email protected]>
Signed-off-by Jann Horn <[email protected]>
---
v2: corrected "Fixes" tag
kernel/seccomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/seccomp.c +2 -2
@@ -1968,7 +1968,7 @@ static bool seccomp_actions_logged_from_names(u32 *actions_logged, char *names)return true; } -static int read_actions_logged (struct ctl_table *ro_table,void __user *buffer, +static int read_actions_logged (struct ctl_table *ro_table,void *buffer,size_t *lenp,loff_t *ppos) {char names[sizeof (seccomp_actions_avail)];
@@ -1986,7 +1986,7 @@ static int read_actions_logged(struct ctl_table *ro_table, void __user *buffer,return proc_dostring (&table,0 , buffer, lenp, ppos); } -static int write_actions_logged (struct ctl_table *ro_table,void __user *buffer, +static int write_actions_logged (struct ctl_table *ro_table,void *buffer,size_t *lenp,loff_t *ppos,u32 *actions_logged) {char names[sizeof (seccomp_actions_avail)];
base-commit: 4d02da974ea85a62074efedf354e82778f910d82
Signature · 1 line
2.29.2.454.gaff20da3a2-goog
Kees Cook
AppliedQuoted 3 lines · Jann Horn
Buffers that are passed to
read_actions_logged()andwrite_actions_logged()are in kernel memory; the sysctl core takes care of copying from/to userspace.
Applied to for-next/seccomp, thanks!
[1/1] seccomp: Remove bogus __user annotations
https://git.kernel.org/kees/c/fab686eb0307
Signature · 1 line
Kees Cook