erofs-utils: fsck: fix an infinite loop of big pclusters
PATCH 1/1 erofs-utils: fsck: fix an infinite loop of big pclusters
From: Gao Xiang <[email protected]>
Actually it's outdated code compared with kernel
commit b86269f43892 ("erofs: support parsing big pcluster compact indexes")
This will cause fsck.erofs works endlessly on some crafted images.
Reported-by Chaoming Yang <[email protected]>
Fixes 418fb683fd96 ("erofs-utils: fsck: fix an infinite loop of big pcluster")
Signed-off-by Gao Xiang <[email protected]>
--- lib/zmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/zmap.c +1 -1
@@ -322,7 +322,7 @@ static int unpack_compacted_index(struct z_erofs_maprecorder *m, nblk += lo & ~Z_EROFS_VLE_DI_D0_CBLKCNT ;continue ; } -if (lo ==1 ) { +if (lo <=1 ) {DBG_BUGON (1 );/* --i; ++nblk; continue; */ return -EFSCORRUPTED ;
Signature · 1 line
2.30.2