Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp420049pxv; Thu, 8 Jul 2021 05:44:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5iVHLDryDar8nuuZJDz6CRTPfQpmiM8+8FoM6YuMkCSV2c4ol58MJ2K0c71m0ELG97EJG X-Received: by 2002:a6b:185:: with SMTP id 127mr16477591iob.64.1625748271867; Thu, 08 Jul 2021 05:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625748271; cv=none; d=google.com; s=arc-20160816; b=h3mVtdkaVhzd6Mk6jAv3C45ab1iKIHkjHyqLYEG0gbM7JuwVsxYQ01ifvKLalU674X SpDtvEdGR3i9pEiLYp8lfXWsqks+p6+lhJPAWYWPMr/Uk+PIXVskxpjWfMuLO6RYxwtV nZCpUHciQ5eEfoXYrzzETaDUzCcMMuyZJw1besrRYxEDI513EAxhuV///2E7GeAwTkd1 rw6ZTX6LN3kYsp9V9sUb+loW01yUIPZPjHwEhl0TjHBQpkeLmwVaw0NrTX8gF3mt8t1G 8y94jVHwZadSy52/tmIPAxY1+6X3GFqu6qi3ykIepiVtnDFQrliPTDqjJSWX6Sb14IMG C8JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=FPMlgO+Zfo14oN0BcwYJE0QxFqpC+nPj8IpTkd710H4=; b=StDFmnnp0sE2SNdHJ7ugFshYoMgmswgEQ/+FLU9ovedK4XS07VJx4qJyll9wGYvODi MQnTskwtDyv1X496/HL+cJocGG5t+p0t6uSn8C2m4HgTDJy8LehuMI6oslXsCK36846b my9pqenFKkFoYiwf+AwyCyj7hokIkeTQ3Y5CzSuOjiOYMwv3B9IaEU54P7M5jJWgFLK8 MEWqyWcujc1haEq0o3rQ9V4dF+rZ/qCYv3YCOQLmDhBgXchAIIq/IuJ3dsB6NMrhN16K i6v3UYulJnf5qwZYya2d8rzjQLzMmJdp16fiulNZsPFNjPqCLnZWKkLao4VsI4ZnZbiX 7mzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=LtDxVYxw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l14si2405421jah.73.2021.07.08.05.44.20; Thu, 08 Jul 2021 05:44:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=LtDxVYxw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231433AbhGHMqg (ORCPT + 99 others); Thu, 8 Jul 2021 08:46:36 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:41564 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbhGHMqg (ORCPT ); Thu, 8 Jul 2021 08:46:36 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6F37421910; Thu, 8 Jul 2021 12:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1625748233; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FPMlgO+Zfo14oN0BcwYJE0QxFqpC+nPj8IpTkd710H4=; b=LtDxVYxw8NSplGmzVQW3iV1asSAQcG2u79ScBvLOfTA9AgcT0W5CJNKY8AWeRfznZYMjT6 SJ93ktysNftCsUW3OTocLzu2Uh1Of6+hkDdUxPfzvMSSZ85RwzA6H7WwToYc19I52HWrN1 BkIRL0rzWzk+5sk2hSRdeD7Td/wtZzk= Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 2FEE912FF6; Thu, 8 Jul 2021 12:43:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id QiFxCgnz5mCCYAAAGKfGzw (envelope-from ); Thu, 08 Jul 2021 12:43:53 +0000 From: Juergen Gross To: xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Juergen Gross , Boris Ostrovsky , Stefano Stabellini , Konrad Rzeszutek Wilk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Jens Axboe Subject: [PATCH v2 0/3] xen: harden blkfront against malicious backends Date: Thu, 8 Jul 2021 14:43:42 +0200 Message-Id: <20210708124345.10173-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Xen backends of para-virtualized devices can live in dom0 kernel, dom0 user land, or in a driver domain. This means that a backend might reside in a less trusted environment than the Xen core components, so a backend should not be able to do harm to a Xen guest (it can still mess up I/O data, but it shouldn't be able to e.g. crash a guest by other means or cause a privilege escalation in the guest). Unfortunately blkfront in the Linux kernel is fully trusting its backend. This series is fixing blkfront in this regard. It was discussed to handle this as a security problem, but the topic was discussed in public before, so it isn't a real secret. Changes in V2: - put blkfront patches into own series - some minor comments addressed Juergen Gross (3): xen/blkfront: read response from backend only once xen/blkfront: don't take local copy of a request from the ring page xen/blkfront: don't trust the backend response data blindly drivers/block/xen-blkfront.c | 122 +++++++++++++++++++++++------------ 1 file changed, 80 insertions(+), 42 deletions(-) -- 2.26.2