[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_17CBBA43BB47335B9E931B5D4BD11B062508@qq.com>
Date: Sun, 30 Jun 2024 17:09:42 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+ae688d469e36fb5138d0@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: [syzbot] [ext4?] BUG: unable to handle kernel paging request in do_split
if split is too small, such as 0, use it to calculate continued will out of bound map
#syz test: upstream 55027e689933
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index a630b27a4cc6..0a111274dc4a 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2043,7 +2043,7 @@ static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
split = count/2;
hash2 = map[split].hash;
- continued = hash2 == map[split - 1].hash;
+ continued = split > 0 ? hash2 == map[split - 1].hash : 0;
dxtrace(printk(KERN_INFO "Split block %lu at %x, %i/%i\n",
(unsigned long)dx_get_block(frame->at),
hash2, split, count-split));
Powered by blists - more mailing lists