diff options
author | Gregory Price <[email protected]> | 2023-04-07 13:18:32 -0400 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2023-04-16 14:23:07 +0200 |
commit | 463b7715e7ce367fce89769c5d85e31595715ee1 (patch) | |
tree | fd74da6fa4a4de6fc0c3e7d888ee221ce8f72948 /lib/memory-notifier-error-inject.c | |
parent | 43360686328b1f4b7d9dcc883ee9243ad7c16fae (diff) |
syscall_user_dispatch: Untag selector address before access_ok()
To support checkpoint/restart, ptrace must be able to set the selector
of the tracee. The selector is a user pointer that may be subject to
memory tagging extensions on some architectures (namely ARM MTE).
access_ok() clears memory tags for tagged addresses if the current task has
memory tagging enabled.
This obviously fails when ptrace modifies the selector of a tracee when
tracer and tracee do not have the same memory tagging enabled state.
Solve this by untagging the selector address before handing it to
access_ok(), like other ptrace functions which modify tracee pointers do.
Obviously a tracer can set an invalid selector address for the tracee, but
that's independent of tagging and a general capability of the tracer.
Suggested-by: Catalin Marinas <[email protected]>
Signed-off-by: Gregory Price <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Catalin Marinas <[email protected]>
Acked-by: Oleg Nesterov <[email protected]>
Link: https://lore.kernel.org/all/[email protected]/
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions