Files
linux/arch/s390/include/asm
Dmitry V. Levin b3583fca5f s390: fix syscall_get_error for compat processes
If both the tracer and the tracee are compat processes, and gprs[2]
is assigned a value by __poke_user_compat, then the higher 32 bits
of gprs[2] are cleared, IS_ERR_VALUE() always returns false, and
syscall_get_error() always returns 0.

Fix the implementation by sign-extending the value for compat processes
the same way as x86 implementation does.

The bug was exposed to user space by commit 201766a20e ("ptrace: add
PTRACE_GET_SYSCALL_INFO request") and detected by strace test suite.

This change fixes strace syscall tampering on s390.

Link: https://lkml.kernel.org/r/20200602180051.GA2427@altlinux.org
Fixes: 753c4dd6a2 ("[S390] ptrace changes")
Cc: Elvira Khabirova <lineprinter@altlinux.org>
Cc: stable@vger.kernel.org # v2.6.28+
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2020-06-17 23:05:05 +02:00
..
2020-01-22 13:05:35 +01:00
2017-12-05 07:51:09 +01:00
2020-05-28 12:21:55 +02:00
2019-04-29 10:47:10 +02:00
2019-04-25 15:34:10 +02:00
2019-04-29 10:47:10 +02:00
2019-06-19 17:54:27 +02:00
2020-05-06 15:19:35 +02:00
2019-02-05 14:29:23 +01:00
2020-01-30 13:07:55 +01:00
2019-04-29 10:47:10 +02:00
2020-02-27 16:02:21 +01:00
2019-06-07 10:09:37 +02:00
2019-02-07 18:06:18 -08:00
2020-05-28 12:21:55 +02:00
2020-05-28 12:21:42 +02:00
2019-04-03 10:32:57 +02:00
2019-07-23 10:45:53 +02:00
2020-06-16 13:44:05 +02:00
2017-12-05 07:51:09 +01:00