linux-stable/security/tomoyo
Tetsuo Handa aa40f5e33c tomoyo: recognize kernel threads correctly
commit 9c83465f32 upstream.

Commit db68ce10c4 ("new helper: uaccess_kernel()") replaced
segment_eq(get_fs(), KERNEL_DS) with uaccess_kernel(). But the correct
method for tomoyo to check whether current is a kernel thread in order
to assume that kernel threads are privileged for socket operations was
(current->flags & PF_KTHREAD). Now that uaccess_kernel() became 0 on x86,
tomoyo has to fix this problem. Do like commit 942cb357ae ("Smack:
Handle io_uring kernel thread privileges") does.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-09 11:11:15 +01:00
..
policy
.gitignore
audit.c
common.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
common.h
condition.c
domain.c mm/gup: remove task_struct pointer for all gup code 2020-08-12 10:58:04 -07:00
environ.c
file.c tomoyo: ignore data race while checking quota 2021-03-07 12:34:05 +01:00
gc.c
group.c
Kconfig
load_policy.c
Makefile
memory.c
mount.c
network.c tomoyo: recognize kernel threads correctly 2021-03-09 11:11:15 +01:00
realpath.c
securityfs_if.c
tomoyo.c
util.c tomoyo: ignore data race while checking quota 2021-03-07 12:34:05 +01:00