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 D503647F774; Thu, 20 Aug 2026 17:46:55 +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=1787248017; cv=none; b=indXl9SrgrKTnP8m7fOBwOUhAim0UD146CzGyzTUSm6Zxy1s9Xpqaj9t3wWNu/1RX1jjrrLiTYpHNDxIVAJTA0NLHLjzxrm/BG+zIYWK9flkGBaNUhvK6rU1ozVuSc4jVxVqDuloTCkjoTZWHw/iToaKJcGgMwjQpW2LS6pSTO0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787248017; c=relaxed/simple; bh=mHNHTeU33KUbksqsOqNi+M2+B+g7UKtFehhnNkQWSm0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=e1bVr8s+GShGgNiTcSVWl/wNXhhUqvTahx31jiouEyE91nvb2Rp4v/E5e9v/IdnOLCnUkW73WkgAFnbVnMpB2T3pYYnvnC7K+l8qrRqBEiJtDNVVBOq0Yt9xmCPYgF84aYqxbXZRcGYhWnpb6BFpMvF9P3tQRVJXA0wRRU+nqpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=I+hK8FiP; 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="I+hK8FiP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BDBB1F000E9; Thu, 20 Aug 2026 17:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787248015; bh=EsxKTJIIE6Q1IKLwlXmXT/vYtUQD513QQLdvSFJshc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=I+hK8FiPY8m9xfp1pXhh6Am4eR82IRv+f+IS8sWPKR99JJb48maKakKsWoDcJ/OlJ GTQWqNkKDkJ/KXIzDjxTg8lbonbZ/WG/J3VdcX0oBFamljBmAfOmoPIKmbKw3YcuUa jf5qrcDsYYvvuLOkUyLCh/Jw/6lpn6nj59GKRK8g= 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 6.1 081/303] VDUSE: avoid leaking information to userspace Date: Thu, 20 Aug 2026 16:53:37 +0200 Message-ID: <20260820145255.594500206@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260820145253.200766705@linuxfoundation.org> References: <20260820145253.200766705@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 6.1-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 @@ -819,7 +819,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;