[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_7BFC4CBAA7D1C6F652C1C660898EEEF5EE06@qq.com>
Date: Wed, 5 Mar 2025 20:08:18 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+9f6d080dece587cfdd4c@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [xfs?] KASAN: slab-out-of-bounds Read in xlog_cksum
#syz test
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index f8851ff835de..6b7eee3c9f7f 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1583,6 +1583,7 @@ xlog_cksum(
int xheads;
xheads = DIV_ROUND_UP(size, XLOG_HEADER_CYCLE_SIZE);
+ printk("xheads: %d, size: %d, %s\n", xheads, size, __func__);
for (i = 1; i < xheads; i++) {
crc = crc32c(crc, &xhdr[i].hic_xheader,
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index b3c27dbccce8..257abbe9c3fa 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2969,6 +2969,7 @@ xlog_valid_rec_header(
* and h_len must not be greater than LR buffer size.
*/
hlen = be32_to_cpu(rhead->h_len);
+ printk("hlen: %d, bufsize: %d, %s\n", hlen, bufsize, __func__);
if (XFS_IS_CORRUPT(log->l_mp, hlen <= 0 || hlen > bufsize))
return -EFSCORRUPTED;
Powered by blists - more mailing lists