No description
Find a file
Eric W. Biederman b5a53485dd ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
commit 6a2d90ba02 upstream.

The current implementation of PTRACE_KILL is buggy and has been for
many years as it assumes it's target has stopped in ptrace_stop.  At a
quick skim it looks like this assumption has existed since ptrace
support was added in linux v1.0.

While PTRACE_KILL has been deprecated we can not remove it as
a quick search with google code search reveals many existing
programs calling it.

When the ptracee is not stopped at ptrace_stop some fields would be
set that are ignored except in ptrace_stop.  Making the userspace
visible behavior of PTRACE_KILL a noop in those case.

As the usual rules are not obeyed it is not clear what the
consequences are of calling PTRACE_KILL on a running process.
Presumably userspace does not do this as it achieves nothing.

Replace the implementation of PTRACE_KILL with a simple
send_sig_info(SIGKILL) followed by a return 0.  This changes the
observable user space behavior only in that PTRACE_KILL on a process
not stopped in ptrace_stop will also kill it.  As that has always
been the intent of the code this seems like a reasonable change.

Cc: stable@vger.kernel.org
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lkml.kernel.org/r/20220505182645.497868-7-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-14 16:53:43 +02:00
arch ptrace: Reimplement PTRACE_KILL by always sending SIGKILL 2022-06-14 16:53:43 +02:00
block block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern 2022-06-06 08:20:57 +02:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-22 11:45:19 +02:00
crypto crypto: authenc - Fix sleep in atomic context in decrypt_tail 2022-04-20 09:08:12 +02:00
Documentation docs: submitting-patches: Fix crossref to 'The canonical patch format' 2022-06-06 08:20:57 +02:00
drivers USB: new quirk for Dell Gen 2 devices 2022-06-14 16:53:43 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:20:30 +01:00
fs binfmt_flat: do not stop relocating GOT entries prematurely on riscv 2022-06-14 16:53:43 +02:00
include ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP 2022-06-14 16:53:43 +02:00
init init/main.c: return 1 from handled __setup() functions 2022-04-20 09:08:28 +02:00
ipc ipc: WARN if trying to remove ipc object which is absent 2021-12-08 08:46:53 +01:00
kernel ptrace: Reimplement PTRACE_KILL by always sending SIGKILL 2022-06-14 16:53:43 +02:00
lib assoc_array: Fix BUG_ON during garbage collect 2022-06-06 08:20:56 +02:00
mm zsmalloc: fix races between asynchronous zspage free and page migration 2022-06-06 08:20:57 +02:00
net bpf: Enlarge offset check value to INT_MAX in bpf_skb_{load,store}_bytes 2022-06-06 08:20:58 +02:00
samples samples/kretprobes: Fix return value if register_kretprobe() failed 2021-11-26 11:40:31 +01:00
scripts gcc-plugins: latent_entropy: use /dev/urandom 2022-04-20 09:08:32 +02:00
security Fix incorrect type in assignment of ipv6 port for audit 2022-04-20 09:08:21 +02:00
sound ALSA: wavefront: Proper check of get_user() error 2022-05-25 08:41:19 +02:00
tools perf bench numa: Address compiler error on s390 2022-05-25 08:41:21 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:34:19 +02:00
virt KVM: Prevent module exit until all VMs are freed 2022-04-20 09:08:24 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper 2018-02-13 10:19:46 +01:00
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address 2017-11-10 12:16:15 -08:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Update drm/i915 bug filing URL 2020-02-28 16:36:12 +01:00
Makefile Linux 4.14.282 2022-06-06 08:20:58 +02:00
README

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.