This is a note to let you know that I've just added the patch titled erofs: fix shift-out-of-bounds of blkszbits to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: erofs-fix-shift-out-of-bounds-of-blkszbits.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From bde545295b710bdd13a0fcd4b9fddd2383eeeb3a Mon Sep 17 00:00:00 2001 From: Gao Xiang <hsiangkao@xxxxxxxxxx> Date: Wed, 20 Jan 2021 09:30:16 +0800 Subject: erofs: fix shift-out-of-bounds of blkszbits From: Gao Xiang <hsiangkao@xxxxxxxxxx> commit bde545295b710bdd13a0fcd4b9fddd2383eeeb3a upstream. syzbot generated a crafted bitszbits which can be shifted out-of-bounds[1]. So directly print unsupported blkszbits instead of blksize. [1] https://lore.kernel.org/r/000000000000c72ddd05b9444d2f@xxxxxxxxxx Link: https://lore.kernel.org/r/20210120013016.14071-1-hsiangkao@xxxxxxx Reported-by: syzbot+c68f467cd7c45860e8d4@xxxxxxxxxxxxxxxxxxxxxxxxx Reviewed-by: Chao Yu <yuchao0@xxxxxxxxxx> Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/erofs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -158,8 +158,8 @@ static int erofs_read_superblock(struct blkszbits = dsb->blkszbits; /* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */ if (blkszbits != LOG_BLOCK_SIZE) { - erofs_err(sb, "blksize %u isn't supported on this platform", - 1 << blkszbits); + erofs_err(sb, "blkszbits %u isn't supported on this platform", + blkszbits); goto out; } Patches currently in stable-queue which might be from hsiangkao@xxxxxxxxxx are queue-5.10/erofs-fix-shift-out-of-bounds-of-blkszbits.patch