Skip to content
Snippets Groups Projects
Commit f0a1bfae authored by Jens Axboe's avatar Jens Axboe Committed by Yongqiang Liu
Browse files

io_uring: add missing item types for various requests

stable inclusion
from stable-v5.10.125
commit df3f3bb5059d20ef094d6b2f0256c4bf4127a859
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I5IM3T


CVE: CVE-2022-2327

--------------------------------

Any read/write should grab current->nsproxy, denoted by IO_WQ_WORK_FILES
as it refers to current->files as well, and connect and recv/recvmsg,
send/sendmsg should grab current->fs which is denoted by IO_WQ_WORK_FS.

No upstream commit exists for this issue.

Reported-by: default avatarBing-Jhong Billy Jheng <billy@starlabs.sg>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Conflicts:
1. read/write already grab current->nsproxy, thus don't modified
read/write related ops.
2. 'work_flags' doesn't exist, io_op_def is using field 'needs_fs' to
decide if 'current->fs' should be grabbed.
Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent f54991eb
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment