All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+b3b14fb9f8a14c5d0267@syzkaller.appspotmail.com
Cc: akpm@linux-foundation.org, axboe@kernel.dk, bvanassche@acm.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	reiserfs-devel@vger.kernel.org, song@kernel.org,
	syzkaller-bugs@googlegroups.com, yi.zhang@huawei.com
Subject: [PATCH] reiserfs: fix uninit-value in comp_keys
Date: Tue, 26 Dec 2023 15:16:09 +0800	[thread overview]
Message-ID: <tencent_9EA7E746DE92DBC66049A62EDF6ED64CA706@qq.com> (raw)
In-Reply-To: <000000000000434c71060d5b6808@google.com>

The cpu_key was not initialized in reiserfs_delete_solid_item(), which triggered
this issue.

Reported-and-tested-by: syzbot+b3b14fb9f8a14c5d0267@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
---
 fs/reiserfs/stree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
index 2138ee7d271d..5faf702f8d15 100644
--- a/fs/reiserfs/stree.c
+++ b/fs/reiserfs/stree.c
@@ -1407,7 +1407,7 @@ void reiserfs_delete_solid_item(struct reiserfs_transaction_handle *th,
 	INITIALIZE_PATH(path);
 	int item_len = 0;
 	int tb_init = 0;
-	struct cpu_key cpu_key;
+	struct cpu_key cpu_key = {};
 	int retval;
 	int quota_cut_bytes = 0;
 
-- 
2.43.0


  parent reply	other threads:[~2023-12-26  7:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 15:41 [syzbot] KASAN: slab-out-of-bounds Read in search_by_key (2) syzbot
2023-12-25 20:28 ` [syzbot] [reiserfs?] " syzbot
2023-12-26  0:11   ` Edward Adam Davis
2023-12-26  2:07     ` syzbot
2023-12-26  7:16   ` Edward Adam Davis [this message]
2023-12-28 10:57     ` [PATCH] reiserfs: fix uninit-value in comp_keys Christian Brauner

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=tencent_9EA7E746DE92DBC66049A62EDF6ED64CA706@qq.com \
    --to=eadavis@qq.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=syzbot+b3b14fb9f8a14c5d0267@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=yi.zhang@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.