lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <151619277281.5683.16110625178528288163.stgit@localhost.localdomain>
Date:   Wed, 17 Jan 2018 15:39:32 +0300
From:   Kirill Tkhai <ktkhai@...tuozzo.com>
To:     gregkh@...uxfoundation.org, jslaby@...e.com, oleg@...hat.com,
        ebiederm@...ssion.com, ktkhai@...tuozzo.com
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH v2 1/3] Revert "do_SAK: Don't recursively take the
 tasklist_lock"

This reverts commit 20ac94378de5.

send_sig() does not take tasklist_lock for a long time,
so this commit and the problem it solves are not relevant
anymore.

Also, the problem of force_sig() is it clears SIGNAL_UNKILLABLE
flag, thus even global init may be killed by __do_SAK(),
which is definitely not the expected behavior.

Came from discussion in "tty: Iterate only thread group leaders in __do_SAK()"
https://lkml.org/lkml/2018/1/11/492

Suggested-by: Oleg Nesterov <oleg@...hat.com>
Signed-off-by: Kirill Tkhai <ktkhai@...tuozzo.com>
---
 drivers/tty/tty_io.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index dc60aeea87d8..84715ba1aee2 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2737,7 +2737,7 @@ void __do_SAK(struct tty_struct *tty)
 		if (i != 0) {
 			tty_notice(tty, "SAK: killed process %d (%s): by fd#%d\n",
 				   task_pid_nr(p), p->comm, i - 1);
-			force_sig(SIGKILL, p);
+			send_sig(SIGKILL, p, 1);
 		}
 		task_unlock(p);
 	} while_each_thread(g, p);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ