[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69748bc5.050a0220.226181.0006.GAE@google.com>
Date: Sat, 24 Jan 2026 01:07:17 -0800
From: syzbot <syzbot+df28076a30d726933015@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Forwarded: [PATCH] iommufd: Initialize pfn_reader in iopt_area_fill_domains()
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com.
***
Subject: [PATCH] iommufd: Initialize pfn_reader in iopt_area_fill_domains()
Author: kartikey406@...il.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
KMSAN reported an uninitialized value in batch_add_pfn_num() when
accessing batch->npfns[] and batch->pfns[] arrays. This occurs because
struct pfn_reader pfns was declared without initialization, leaving
the embedded pfn_batch structure and its arrays uninitialized.
Initialize pfns to zero to ensure all fields and embedded structures
start in a known state.
Reported-by: syzbot+df28076a30d726933015@...kaller.appspotmail.com
Signed-off-by: Deepanshu Kartikey <kartikey406@...il.com>
---
drivers/iommu/iommufd/pages.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/iommufd/pages.c b/drivers/iommu/iommufd/pages.c
index dbe51ecb9a20..a07373cf013c 100644
--- a/drivers/iommu/iommufd/pages.c
+++ b/drivers/iommu/iommufd/pages.c
@@ -1897,7 +1897,7 @@ int iopt_area_fill_domains(struct iopt_area *area, struct iopt_pages *pages)
unsigned long done_all_end_index;
struct iommu_domain *domain;
unsigned long unmap_index;
- struct pfn_reader pfns;
+ struct pfn_reader pfns = {};
unsigned long index;
int rc;
--
2.43.0
Powered by blists - more mailing lists