From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D45BCC433B4 for ; Thu, 8 Apr 2021 02:06:21 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 167CE611BD for ; Thu, 8 Apr 2021 02:06:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 167CE611BD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1lUJyu-0007Ho-IF; Wed, 07 Apr 2021 22:01:16 -0400 Received: from mga14.intel.com ([192.55.52.115]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lUJpp-0006XF-2M for kernelnewbies@kernelnewbies.org; Wed, 07 Apr 2021 21:51:53 -0400 IronPort-SDR: huNBwPOan6IIkGTQONAuZpiGTsigdGQKNP0XUZvtJc4HteLe81iPGh3vF6XG6+1i09gyxFbCxs gC67VNAj3NGQ== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="192975825" X-IronPort-AV: E=Sophos;i="5.82,205,1613462400"; d="scan'208";a="192975825" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 18:51:50 -0700 IronPort-SDR: KkR7dmnwh/S7YKPk0/ghxR1MAb5d5PEbZ44OrCZwAq1WClc6HLdQJvy1HHc+m6t1nK3J4S4aim 8qvBzS4+CIrA== X-IronPort-AV: E=Sophos;i="5.82,205,1613462400"; d="scan'208";a="519655562" Received: from tassilo.jf.intel.com ([10.54.74.11]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 18:51:50 -0700 Date: Wed, 7 Apr 2021 18:51:48 -0700 From: Andi Kleen To: Valdis =?utf-8?Q?Kl=C4=93tnieks?= Subject: Re: Notify special task kill using wait* functions Message-ID: <20210408015148.GB3762101@tassilo.jf.intel.com> References: <20210402124932.GA3012@ubuntu> <106842.1617421818@turing-police> <20210403070226.GA3002@ubuntu> <145687.1617485641@turing-police> <20210404094837.GA3263@ubuntu> <193167.1617570625@turing-police> <20210405073147.GA3053@ubuntu> <115437.1617753336@turing-police> <20210407175151.GA3301@ubuntu> <184666.1617827926@turing-police> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <184666.1617827926@turing-police> X-Mailman-Approved-At: Wed, 07 Apr 2021 22:01:14 -0400 Cc: kernel-hardening@lists.openwall.com, John Wood , Kees Cook , kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org > I didn't even finish the line that starts "From now on.." before I started > wondering "How can I abuse this to hang or crash a system?" And it only took > me a few seconds to come up with an attack. All you need to do is find a way to > sigsegv /bin/bash... and that's easy to do by forking, excecve /bin/bash, and > then use ptrace() to screw the child process's stack and cause a sigsegv. > > Say goodnight Gracie... Yes there is certainly DoS potential, but that's kind of inevitable for the proposal. It's a trade between allowing attacks and allowing DoS, with the idea that a DoS is more benign. I'm more worried that it doesn't actually prevent the attacks unless we make sure systemd and other supervisor daemons understand it, so that they don't restart. Any caching of state is inherently insecure because any caches of limited size can be always thrashed by a purposeful attacker. I suppose the only thing that would work is to actually write something to the executable itself on disk, but of course that doesn't always work either. -Andi _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies