reiserfs: fix uninit-value in comp_keys
authorEdward Adam Davis <eadavis@qq.com>
Tue, 26 Dec 2023 07:16:09 +0000 (15:16 +0800)
committerChristian Brauner <brauner@kernel.org>
Thu, 28 Dec 2023 10:56:52 +0000 (11:56 +0100)
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>
Link: https://lore.kernel.org/r/tencent_9EA7E746DE92DBC66049A62EDF6ED64CA706@qq.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/reiserfs/stree.c

index 2138ee7d271dd80656d3ff26326478accc6613e9..5faf702f8d1521ab93d8d6b3d13d318318528607 100644 (file)
@@ -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;