]> granicus.if.org Git - strace/commit
Fix syscall tampering when PTRACE_GET_SYSCALL_INFO is in use on some architectures
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 15 Aug 2019 20:23:19 +0000 (20:23 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 15 Aug 2019 20:23:19 +0000 (20:23 +0000)
commit2b3d59c14b0801cd1454d3bb383be7fe333e68b0
tree83939521e122c3b4c26f5ee2a7a732c4371c0917
parent37c8cfff11b8691c8ca8c72d122842fc0ae368e3
Fix syscall tampering when PTRACE_GET_SYSCALL_INFO is in use on some architectures

When PTRACE_GET_SYSCALL_INFO is in use on those architectures
that invoke set_regs in arch_set_scno, get_regs is not called,
so it has to be invoked explicitly before tampering.

* linux/arc/set_scno.c (arch_set_scno): Explicitly call get_regs
when PTRACE_GET_SYSCALL_INFO is in use.
* linux/avr32/set_scno.c: Likewise.
* linux/csky/set_scno.c: Likewise.
* linux/ia64/set_scno.c: Likewise.
* linux/m68k/set_scno.c: Likewise.
* linux/metag/set_scno.c: Likewise.
* linux/mips/set_scno.c: Likewise.
* linux/nios2/set_scno.c: Likewise.
* linux/or1k/set_scno.c: Likewise.
* linux/riscv/set_scno.c: Likewise.
* linux/s390/set_scno.c: Likewise.
* linux/sparc/set_scno.c: Likewise.
* linux/tile/set_scno.c: Likewise.
* NEWS: Mention this fix.

Thanks-to: Anatoly Pugachev <matorola@gmail.com>
Fixes: v5.2~27 "sparc, sparc64: fix syscall tampering when PTRACE_GET_SYSCALL_INFO is in use"
14 files changed:
NEWS
linux/arc/set_scno.c
linux/avr32/set_scno.c
linux/csky/set_scno.c
linux/ia64/set_scno.c
linux/m68k/set_scno.c
linux/metag/set_scno.c
linux/mips/set_scno.c
linux/nios2/set_scno.c
linux/or1k/set_scno.c
linux/riscv/set_scno.c
linux/s390/set_scno.c
linux/sparc/set_scno.c
linux/tile/set_scno.c