Skip to content

Commit

Permalink
UPSTREAM: seccomp: Remove bogus __user annotations
Browse files Browse the repository at this point in the history
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: 3292739 ("sysctl: pass kernel pointers to ->proc_handler")
Reviewed-by: Tyler Hicks <code@tyhicks.com>
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20201120170545.1419332-1-jannh@google.com
(cherry picked from commit fab686e)
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Change-Id: I378d1eb73ff01928d3255191ed4443cd7b87c720
Bug: 176068146
  • Loading branch information
thejh authored and toddkjos committed Jan 20, 2021
1 parent e9703e0 commit 5444477
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/seccomp.c
Expand Up @@ -2023,7 +2023,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)];
Expand All @@ -2041,7 +2041,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)];
Expand Down

0 comments on commit 5444477

Please sign in to comment.