Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 147E4377A89; Thu, 20 Aug 2026 16:29:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787243396; cv=none; b=CfHFxMt7wH0ijUvNYkHa3RPypoEtDtDn3LKkDq+G0uwp3GGYrthwte092VJrpKnTtyDsyGaJMDFpgZyKQRVz8D/472PnGTK7iFlnfHcdiiOmAdr7M7KUq0ZQDonxYImE5p64oP5TBl30uE8UZH5p4hG77ryl++4KoauUcPluMwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787243396; c=relaxed/simple; bh=e5cMMWp8Lb5QD0InEAKhg1wYbyZIiYIJfh4oJ/92AuM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dpQE+KrVpeGMabF3WqVpl19ILX9D1KU9dbo1GkedxXK6oyrHfdtv6YkTTlOLDAIG/3qdvfRTEkmiR0Gw9WG7Q96O9+oZSH/c9iPTwkb2S+uWe9jBx5ZPMAZePukpUTXTBRqL23oqB+IhU1nx/EELUWb9UIi0p/nGTajfW7PD5Nk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LMAfpvCA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="LMAfpvCA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F84B1F000E9; Thu, 20 Aug 2026 16:29:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787243394; bh=afLzopoGE8DqBSO6Ka3djlTaMirQmgr2Vdaw9HFikyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LMAfpvCAezAE1YE3iwjRxauZUMLRsN9IvOE+JvCXBAj5oh2kGZd+/St8PbavSGqc4 5cff8qbwfgEvGD5+HKKf4S7cPYalo3LvzgxVgVlDBIrliMGVB6pnJ7VUUXnMdvRnw6 1NpeYifRzMIzCAJimQ52C1tpwf+pGSS5/ErQd9oE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jason Wang , Xie Yongji , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , "Michael S. Tsirkin" , Sasha Levin Subject: [PATCH 5.15 073/272] VDUSE: avoid leaking information to userspace Date: Thu, 20 Aug 2026 16:54:17 +0200 Message-ID: <20260820145233.472442267@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260820145231.229664293@linuxfoundation.org> References: <20260820145231.229664293@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jason Wang [ Upstream commit 9c1523803445ee0348f62b77793266dd981596e0 ] The bounceing is not necessarily page aligned, so current VDUSE can leak kernel information through mapping bounce pages to userspace. Allocate bounce pages with __GFP_ZERO to avoid leaking information to userspace. Fixes: 8c773d53fb7b ("vduse: Implement an MMU-based software IOTLB") Cc: stable@vger.kernel.org Signed-off-by: Jason Wang Reviewed-by: Xie Yongji Reviewed-by: Eugenio Pérez Signed-off-by: Michael S. Tsirkin Message-ID: <20260130050750.4050-1-jasowang@redhat.com> Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/vdpa/vdpa_user/iova_domain.c | 2 +- drivers/vdpa/vdpa_user/vduse_dev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/drivers/vdpa/vdpa_user/iova_domain.c +++ b/drivers/vdpa/vdpa_user/iova_domain.c @@ -124,7 +124,7 @@ static int vduse_domain_map_bounce_page( if (!map->bounce_page) { head_map = &domain->bounce_maps[(iova & PAGE_MASK) >> BOUNCE_MAP_SHIFT]; if (!head_map->bounce_page) { - tmp_page = alloc_page(GFP_ATOMIC); + tmp_page = alloc_page(GFP_ATOMIC | __GFP_ZERO); if (!tmp_page) return -ENOMEM; if (cmpxchg(&head_map->bounce_page, NULL, tmp_page)) --- a/drivers/vdpa/vdpa_user/vduse_dev.c +++ b/drivers/vdpa/vdpa_user/vduse_dev.c @@ -799,7 +799,7 @@ static void *vduse_dev_alloc_coherent(st *dma_addr = DMA_MAPPING_ERROR; - addr = alloc_pages_exact(size, flag); + addr = alloc_pages_exact(size, flag | __GFP_ZERO); if (!addr) return NULL;