public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+7ea0b96c4ddb49fd1a70@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: Re: [syzbot] KMSAN: uninit-value in ocfs2_recover_local_quota_file
Date: Fri, 17 Apr 2026 09:21:14 -0700	[thread overview]
Message-ID: <69e25dfa.a00a0220.1cdc.001b.GAE@google.com> (raw)
In-Reply-To: <67ddd191.050a0220.25ae54.006a.GAE@google.com>

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

***

Subject: Re: [syzbot] KMSAN: uninit-value in ocfs2_recover_local_quota_file
Author: tristmd@gmail.com

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>From 1ade1b62aa44f46691057222a65eebd8ce67f470 Mon Sep 17 00:00:00 2001
From: Tristan Madani <tristan@talencesecurity.com>
Date: Fri, 17 Apr 2026 16:15:18 +0000
Subject: [PATCH] ocfs2: zero-initialize quota recovery bitmap allocation
ocfs2_add_recovery_chunk() allocates rc_bitmap with kmalloc,
leaving the bitmap uninitialized. Bits beyond the actual quota
entries contain stale heap data, which KMSAN detects as
uninit-value during recovery.
Replace kmalloc with kzalloc to ensure the bitmap is zeroed.
Reported-by: syzbot+7ea0b96c4ddb49fd1a70@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7ea0b96c4ddb49fd1a70
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
 fs/ocfs2/quota_local.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index 12cbb4f..f55810c 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -302,7 +302,7 @@ static int ocfs2_add_recovery_chunk(struct super_block *sb,
 	if (!rc)
 		return -ENOMEM;
 	rc->rc_chunk = chunk;
-	rc->rc_bitmap = kmalloc(sb->s_blocksize, GFP_NOFS);
+	rc->rc_bitmap = kzalloc(sb->s_blocksize, GFP_NOFS);
 	if (!rc->rc_bitmap) {
 		kfree(rc);
 		return -ENOMEM;
-- 
2.47.3

      parent reply	other threads:[~2026-04-17 16:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 20:52 [syzbot] [ocfs2?] KMSAN: uninit-value in _find_next_bit syzbot
2025-03-22  1:40 ` Edward Adam Davis
2025-03-22  6:02   ` syzbot
2025-03-22  8:41 ` Edward Adam Davis
2025-03-22  9:05   ` syzbot
2025-03-23  2:36 ` Edward Adam Davis
2025-03-23  9:52   ` syzbot
2025-03-23 10:17 ` Edward Adam Davis
2025-03-23 10:43   ` syzbot
2025-03-24  1:01 ` [syzbot] " syzbot
2025-03-24  1:39 ` syzbot
2025-03-26  1:09 ` [PATCH] " I Hsin Cheng
2025-03-26  1:23 ` I Hsin Cheng
2025-03-26  1:59   ` syzbot
2025-03-26  2:19 ` I Hsin Cheng
2025-03-26  2:43   ` syzbot
2025-03-26  3:04 ` I Hsin Cheng
2025-03-26  3:58   ` syzbot
2025-03-26  3:20 ` [syzbot] " syzbot
2026-04-17 10:12 ` Forwarded: [PATCH] ocfs2: zero-initialize quota recovery bitmap allocation syzbot
2026-04-17 16:21 ` syzbot [this message]

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=69e25dfa.a00a0220.1cdc.001b.GAE@google.com \
    --to=syzbot+7ea0b96c4ddb49fd1a70@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