From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 4E0BB5A0262 for ; Thu, 9 Mar 2023 06:06:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678338416; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qp8w7Zy+WznyxB4JgMo/Sv+568vsx5u/Ipx8q/lBDDs=; b=Fb5nUsf5gjnjXjjIEPrmKTxkXTa7ZhfoZ5o/CVP/9lAQniklyxhJpMIpxo362BbAVHMykM 7ZY+13y4gKxjJSpSZtWIMquvbz/PImLnhY+d5eDOJh4zNxu4HyzIPNaC/zjvlUjxIFcN/l 8O59AOo4hf7slZ1hCwcJUxWur6CE3YU= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-HzmpnQl0MyeJ7G1l8kUuAA-1; Thu, 09 Mar 2023 00:06:54 -0500 X-MC-Unique: HzmpnQl0MyeJ7G1l8kUuAA-1 Received: by mail-qv1-f69.google.com with SMTP id s18-20020a0cf792000000b00572c04240f1so644858qvn.8 for ; Wed, 08 Mar 2023 21:06:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678338414; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qp8w7Zy+WznyxB4JgMo/Sv+568vsx5u/Ipx8q/lBDDs=; b=LKDU+U50mD0QCfcfQKDlNWBSi4mFHzcPgfdJnneDfZBrs1qni6IHdo2sGUYaQ9UFk0 GSJ1xDY/ZeRA4DI5BMzhTTa7H+GXahXfttLg3+OzkasoNYHpIX2bIW11SuuqXfrsyOj6 WhNEdN8qAxeNxHticslt8pt4KFf6bIRGRHvzvjPil65YG8qG/g7T7RHZd3gh4mHGVzLe Y/+fg0KRF2zC9F4NVD4RZKBKz2uCPq7EfUHo4HHa1EfUtH1GzKEidvcQ6VWGwS20CeMJ Sn7ql1B7AoKkCnvpSNl4xdFhy4Df4aJCf1cTVDaKzdEgfMOAjPxSi+YGA6E1N8UFRDEy BtqQ== X-Gm-Message-State: AO0yUKWHaJAZrmLx9xF8kWWEgqd5fjPeEOznxmZLzUOQNqnjcSD2SLo0 WqwuTtM3/Dzf/jQGJHWH+xzJJ61PgCe6o8sgZ5gPZn5GXf2wLEjV6EHxW4XLvpIyXaMW49vklIB sVHdgnqHuM06D X-Received: by 2002:ac8:58cb:0:b0:3b8:68df:fc75 with SMTP id u11-20020ac858cb000000b003b868dffc75mr2041811qta.31.1678338414375; Wed, 08 Mar 2023 21:06:54 -0800 (PST) X-Google-Smtp-Source: AK7set8veInGmntL41Nj1sScnDK90opUf3li6fI91YaQfaEN0pt7GsNVwrTukgfehEOsSf5vzQO3sQ== X-Received: by 2002:ac8:58cb:0:b0:3b8:68df:fc75 with SMTP id u11-20020ac858cb000000b003b868dffc75mr2041801qta.31.1678338414137; Wed, 08 Mar 2023 21:06:54 -0800 (PST) Received: from [10.24.0.30] (ip24-254-202-229.hr.hr.cox.net. [24.254.202.229]) by smtp.gmail.com with ESMTPSA id f18-20020ac80152000000b003bd21323c80sm12834736qtg.11.2023.03.08.21.06.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Mar 2023 21:06:53 -0800 (PST) Message-ID: Date: Thu, 9 Mar 2023 00:06:52 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [libvirt PATCH 0/4] qemu/security: start passt process with correct SELinux label From: Laine Stump To: libvir-list@redhat.com References: <20230309044908.29316-1-laine@redhat.com> Organization: Red Hat In-Reply-To: <20230309044908.29316-1-laine@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: 65JIZDRKUHYJ6SACTC4KVDKRAD5747IQ X-Message-ID-Hash: 65JIZDRKUHYJ6SACTC4KVDKRAD5747IQ X-MailFrom: laine@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 3/8/23 11:49 PM, Laine Stump wrote: > All the necessary explanation is in Path 3/4 > > We may want to turn on this same behavior for some other external > processes, but right now the one we need it for is passt. > > Resolves: https://bugzilla.redhat.com/2172267 I forgot to mention that proper operation requires the latest updates to passt, as well as a patch to selinux-policy that still needs to be posted/merged. > > Laine Stump (4): > util: add an API to retrieve the resolved path to a virCommand's > binary > security: make args to virSecuritySELinuxContextAddRange() const > security: make it possible to set SELinux label of child process from > its binary > qemu: set SELinux label of passt process to its own binary's label > > src/libvirt_private.syms | 1 + > src/qemu/qemu_dbus.c | 2 +- > src/qemu/qemu_passt.c | 2 +- > src/qemu/qemu_process.c | 2 +- > src/qemu/qemu_security.c | 5 ++- > src/qemu/qemu_security.h | 1 + > src/qemu/qemu_slirp.c | 2 +- > src/qemu/qemu_tpm.c | 3 +- > src/qemu/qemu_vhost_user_gpu.c | 2 +- > src/security/security_apparmor.c | 1 + > src/security/security_dac.c | 1 + > src/security/security_driver.h | 1 + > src/security/security_manager.c | 8 +++- > src/security/security_manager.h | 1 + > src/security/security_nop.c | 1 + > src/security/security_selinux.c | 77 ++++++++++++++++++++++++++++++-- > src/security/security_stack.c | 5 ++- > src/util/vircommand.c | 51 ++++++++++++++++----- > src/util/vircommand.h | 1 + > 19 files changed, 143 insertions(+), 24 deletions(-) >