Re: [syzbot] [udf?] KASAN: slab-out-of-bounds Read in udf_get_filelongad (2)
From: Zhao Mengmeng
Date: Tue Sep 10 2024 - 03:28:33 EST
#syz testdiff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 4726a4d014b6..350962bfc71f 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -666,7 +666,7 @@ static int udf_extend_file(struct inode *inode, loff_t newsize)
elen > ((loff_t)offset + 1) << inode->i_blkbits);
if ((!epos.bh && epos.offset == udf_file_entry_alloc_offset(inode)) ||
- (epos.bh && epos.offset == sizeof(struct allocExtDesc))) {
+ (epos.offset == sizeof(struct allocExtDesc))) {
/* File has no extents at all or has empty last
* indirect extent! Create a fake extent... */
extent.extLocation.logicalBlockNum = 0;