diff options
author | Jann Horn <jannh@google.com> | 2018-06-25 18:34:19 +0200 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-08-11 09:05:53 +0200 |
commit | 5820f140edef111a9ea2ef414ab2428b8cb805b1 (patch) | |
tree | 3c8f89bbc5c3dcf1bdc0713dd1bcd1d9997c5da4 /arch/alpha/kernel/signal.c | |
parent | cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias() (diff) | |
download | linux-5820f140edef111a9ea2ef414ab2428b8cb805b1.tar.xz linux-5820f140edef111a9ea2ef414ab2428b8cb805b1.zip |
userns: move user access out of the mutex
The old code would hold the userns_state_mutex indefinitely if
memdup_user_nul stalled due to e.g. a userfault region. Prevent that by
moving the memdup_user_nul in front of the mutex_lock().
Note: This changes the error precedence of invalid buf/count/*ppos vs
map already written / capabilities missing.
Fixes: 22d917d80e84 ("userns: Rework the user_namespace adding uid/gid...")
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Acked-by: Christian Brauner <christian@brauner.io>
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'arch/alpha/kernel/signal.c')
0 files changed, 0 insertions, 0 deletions