Re: Syakaller testing for KASAN: slab-out-of-bounds Read in dbAllocBits bug

From: Prithvi Tambewagh

Date: Tue Nov 25 2025 - 14:29:28 EST


#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7367539ad4b0f8f9b396baf02110962333719a48

Signed-off-by: Prithvi Tambewagh <activprithvi@xxxxxxxxx>
---
fs/jfs/jfs_dmap.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index cb3cda1390ad..8dba15c83a49 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -2142,6 +2142,11 @@ static void dbAllocBits(struct bmap * bmp, struct dmap * dp, s64 blkno,
int size;
s8 *leaf;

+ if(blkno >= le64_to_cpu(bmp->db_mapsize)) {
+ jfs_error(bmp->db_ipbmap->i_sb, "Allocation request out of bounds\n");
+ return;
+ }
+
/* pick up a pointer to the leaves of the dmap tree */
leaf = dp->tree.stree + LEAFIND;


base-commit: 7367539ad4b0f8f9b396baf02110962333719a48
--
2.34.1