Commit eb8718f8 authored by Aleksa Sarai's avatar Aleksa Sarai Committed by Xie XiuQi
Browse files

openat2: reject RESOLVE_BENEATH|RESOLVE_IN_ROOT



stable inclusion
from stable-5.10.4
commit aa606ebab122a108c2af4304a6036fc5c87ee85e
bugzilla: 46903

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

commit 398840f8 upstream.

This was an oversight in the original implementation, as it makes no
sense to specify both scoping flags to the same openat2(2) invocation
(before this patch, the result of such an invocation was equivalent to
RESOLVE_IN_ROOT being ignored).

This is a userspace-visible ABI change, but the only user of openat2(2)
at the moment is LXC which doesn't specify both flags and so no
userspace programs will break as a result.

Fixes: fddb5d43 ("open: introduce openat2(2) syscall")
Signed-off-by: default avatarAleksa Sarai <cyphar@cyphar.com>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Cc: <stable@vger.kernel.org> # v5.6+
Link: https://lore.kernel.org/r/20201027235044.5240-2-cyphar@cyphar.com


Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 109425e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment