Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp290165imw; Fri, 15 Jul 2022 03:22:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u2jHydZRPLX3IZ6SxyW0UAfzLFREHliV4G45fH4I0uT0TDNcBvhGLjy3Ljv4kinrzgSCbC X-Received: by 2002:a17:903:41c8:b0:16c:59be:7651 with SMTP id u8-20020a17090341c800b0016c59be7651mr12730839ple.13.1657880565031; Fri, 15 Jul 2022 03:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657880565; cv=none; d=google.com; s=arc-20160816; b=OxmTfZjYx/enJr26mV4ygrg2xUoEx6C8URs6XXpNAnvABCo8dkeWqHPf/SP3o3Sal+ jdbErcZLhLePaQsGupTz1kySmOo+LZ0NdT2isDUGUk8U9vWmTt0qpSxtYoxyyDZhuhFi Qw5RHMEXPhtpSvu7ETTvkiXgMmZPwNNvhChgzmVHBApF+uYV5bNaINvHLCBciS+ccXYw lYfyYjWBW5ZGzR8B3BIauJHtbHu7GcPhINpyEIAy7nuL9cj6XmWPOgIS2BFa6KQl/J0L iWip2mDzka+gVruovrtoBU43d5+WuMQsYxjXcr1z7Ag7J6R9e1/i7ctTibyZHaL7AcXj pfXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=ACiNeAnHVNnJ/W4OhZCGTMGcHGRaYtsznETVX9y3dVs=; b=uiVt71TaqQvKjXic4Rq2+KbVXLv1A/RyiYa2ICqzrc7jMde5xSV+VAXRaD/LKhJTN2 Eg8/YcOLfGq02Z7xIuX+Gv2qty42CAc1fVnSSWOndgaPGbmKObaTuOOsUobO/PWG5Q0X RcF6zhjbn9WMGLrIXKyd5xUNmAnOpnG9OSztGVHSWeDr7B7C4DvWyFZielSLMH84tPm2 TR7/vRwZF0OBbcDEN3d6+U3F8Fl+ELsHwsgT1ryFgFW8/7TMvBPTIxqXmgMar2cxPERg KSbUAb9tAae9PUTdPavLT+zpbqidS8H2yGM4J6/tq47HzjtkRzgmvPt/DagU76gCmUz9 SvLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ps4BUfzb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk10-20020a056a02028a00b00412a00de71fsi4877877pgb.552.2022.07.15.03.22.30; Fri, 15 Jul 2022 03:22:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ps4BUfzb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232603AbiGOJgW (ORCPT + 99 others); Fri, 15 Jul 2022 05:36:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231794AbiGOJgT (ORCPT ); Fri, 15 Jul 2022 05:36:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 275687E005 for ; Fri, 15 Jul 2022 02:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657877778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ACiNeAnHVNnJ/W4OhZCGTMGcHGRaYtsznETVX9y3dVs=; b=Ps4BUfzbjG6ub3ZpU77Wdz1ZDNSp+aOlveWnmkxbNISB2KM6Fbye0d7Hx5IfIEl2sPwq2t p95pTsNRZYEjQ0YqKf/cI6M2N4SJaIV/hn6rHdqV2yyb11FG/usHq+k7SNbZHDkifXGexh NF9NsigwXWKeMy/CbPGiFxHBMc5rdAg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-57-XWPPcm9EMiaQDKivgu1NyA-1; Fri, 15 Jul 2022 05:36:12 -0400 X-MC-Unique: XWPPcm9EMiaQDKivgu1NyA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 795CB85A585; Fri, 15 Jul 2022 09:36:12 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6ACF12026D64; Fri, 15 Jul 2022 09:36:12 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id 26F9aCks005568; Fri, 15 Jul 2022 05:36:12 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 26F9aCSN005565; Fri, 15 Jul 2022 05:36:12 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Fri, 15 Jul 2022 05:36:12 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Daniil Lunev cc: Mike Snitzer , dm-devel@redhat.com, Brian Geffon , Alasdair Kergon , linux-kernel@vger.kernel.org Subject: Re: [dm-devel] [PATCH 1/1] dm: add message command to disallow device open In-Reply-To: Message-ID: References: <20220704000225.345536-1-dlunev@chromium.org> <20220704100221.1.I15b3f7a84ba5a97fde9276648e391b54957103ff@changeid> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Jul 2022, Daniil Lunev wrote: > Hi Mike, > Thank you for your response. I should have probably added more context > to the commit message that I specified in the cover letter. The idea is to > prohibit access of all userspace, including the root. The main concern here > is potential system applications' vulnerabilities that can trick the system to > operate on non-intended files with elevated permissions. While those could > also be exploited to get more access to the regular file systems, those firstly > has to be useable by userspace for normal system operation (e.g. to store > user data), secondly, never contain plain text secrets. Swap content is a > different story - access to it can leak very sensitive information, which > otherwise is never available as plaintext on any persistent media - e.g. raw > user secrets, raw disk encryption keys etc, other security related tokens. > Thus we propose a mechanism to enable such a lockdown after necessary > configuration has been done to the device at boot time. > --Daniil If someone gains root, he can do anything on the system. I'm quite skeptical about these attempts; protecting the system from the root user is never-ending whack-a-mole game. Mikulas