public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+df28076a30d726933015@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH] iommufd: Initialize pfn_reader in iopt_area_fill_domains()
Date: Sat, 24 Jan 2026 01:07:17 -0800	[thread overview]
Message-ID: <69748bc5.050a0220.226181.0006.GAE@google.com> (raw)
In-Reply-To: <69746a86.050a0220.226181.0002.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: [PATCH] iommufd: Initialize pfn_reader in iopt_area_fill_domains()
Author: kartikey406@gmail.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@syzkaller.appspotmail.com
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.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


  reply	other threads:[~2026-01-24  9:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-24  6:45 [syzbot] [iommu?] KMSAN: uninit-value in pfn_reader_next syzbot
2026-01-24  9:07 ` syzbot [this message]
2026-01-24 11:24 ` Forwarded: [PATCH] iommufd: Initialize batch structures in map/unmap paths syzbot
2026-01-24 12:46 ` Forwarded: [PATCH] iommufd: Initialize batch->kind in batch_clear() syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69748bc5.050a0220.226181.0006.GAE@google.com \
    --to=syzbot+df28076a30d726933015@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox