From nobody Sun Feb 8 15:59:26 2026 Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94D3E12B143 for ; Sat, 24 Jan 2026 12:46:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769258788; cv=none; b=iVFAFHeu/O/svAcolRlfZJEDgYWy3Cqli7TIQ/PZKjXfyTjARfTCrgULFi81BnCUFAXzmawWBxx/8HvN5L6XBHZ3UPyxh9AI9ik/s6ywzt0H3omifPA9PUNjBRJo2BPiyKrAQIGok6RZ4arKTDiqYr7hA2bue81QUxkgzLtxM8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769258788; c=relaxed/simple; bh=JDOogGLO8LKpCbGj65xYK89JuFMKol60UwOq7uC/PLI=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=espS2A6elYqyUU7ay4oMgCUTGB+tyN6uNctfAoAA00/KZBWndO2bnXhMOivXvAi7dFwYr0BFRIaWVjY58Di4qjTSMo7nCivgAj86yXyGtj7wA437eWy662h7iqLkZoUj2f+E6lj+E034sH1wBGYV8zVCw97BYxGapvn1r3RnH8s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.210.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-ot1-f72.google.com with SMTP id 46e09a7af769-7d14b9caf47so7935985a34.1 for ; Sat, 24 Jan 2026 04:46:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769258785; x=1769863585; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dueeX9lsuDSj1vvZqzJhwATo0CSmyvp/DZyLLefsmtA=; b=OCxV9LcEL3c5t6taoB9t7gSWvg2kcdNmoKGeqYZVyQ3RLTPQa1AFhhpxMwzwHSifzS CrbeOKiHIUngNm9HIWVxzNZYxivqXc9/R6RT8wyN1ZQn+k+p5hsZ2YmfQnY/7m6ts/SG RpPip3PE2mY+JcLSRDNNZ1oHIw8dNEPIP8bbgWPUb3aSREzt8xWCaNveUsOnfVVwPtuN XtwprUP93A3NaDB5EGwTFOr/9FubUsHcPn2PDFEC31msB7gqrKNMbfJq9hvVjOY/UIcD CoepPVpaEIvhOIEtJ02+e4d3LqDhSy7iFTveZJtxwDufWzm7EGkAVrwpJoKoCxpwFJQA HJiA== X-Gm-Message-State: AOJu0Yy8bYjTS19+B2maqiuSP1OjCbkordd3UUPFaZkggDPTCnbIteH5 fF/DK8gC+HrwvIURce6B6pWJkgkzxkCSu0m+sQocdLV+8BGOk4W0J+H4VI7RLuMKk8JNgZ0QXBJ HXuowR3/SXdwoiB6gcuxVweWrCxX9dr6yzrKJqyS2/lCTSjdRdGj5i/24wBw= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:6ae3:b0:65b:37a9:8b25 with SMTP id 006d021491bc7-662cab92531mr2927338eaf.62.1769258785683; Sat, 24 Jan 2026 04:46:25 -0800 (PST) Date: Sat, 24 Jan 2026 04:46:25 -0800 In-Reply-To: <69746a86.050a0220.226181.0002.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6974bf21.a00a0220.33ccc7.0009.GAE@google.com> Subject: Forwarded: [PATCH] iommufd: Initialize batch->kind in batch_clear() From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] iommufd: Initialize batch->kind in batch_clear() Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git= master KMSAN reported an uninitialized value when batch_add_pfn_num() reads batch->kind. This occurs because batch_clear() does not initialize the kind field, leaving it with garbage data when a struct pfn_batch is declared on the stack. When batch_add_pfn_num() checks "if (batch->kind !=3D kind)", it reads this uninitialized value, triggering KMSAN warnings. Initialize batch->kind to zero in batch_clear() to ensure the field always starts in a known state. Reported-by: syzbot+df28076a30d726933015@syzkaller.appspotmail.com Signed-off-by: Deepanshu Kartikey --- drivers/iommu/iommufd/pages.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/iommufd/pages.c b/drivers/iommu/iommufd/pages.c index dbe51ecb9a20..f606148920fa 100644 --- a/drivers/iommu/iommufd/pages.c +++ b/drivers/iommu/iommufd/pages.c @@ -289,6 +289,7 @@ static void batch_clear(struct pfn_batch *batch) batch->end =3D 0; batch->pfns[0] =3D 0; batch->npfns[0] =3D 0; + batch->kind =3D 0; } =20 /* --=20 2.43.0