Re: [syzbot] [jfs?] UBSAN: shift-out-of-bounds in dbFindCtl

From: Aleksandr Nogikh
Date: Fri Mar 31 2023 - 04:45:07 EST


On Thu, Mar 30, 2023 at 9:45 PM syzbot
<syzbot+7edb85bc97be9f350d90@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> syzbot suspects this issue was fixed by commit:
>
> commit fad376fce0af58deebc5075b8539dc05bf639af3
> Author: Liu Shixin via Jfs-discussion <jfs-discussion@xxxxxxxxxxxxxxxxxxxxx>
> Date: Thu Nov 3 03:01:59 2022 +0000
>
> fs/jfs: fix shift exponent db_agl2size negative
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=146d74a5c80000
> start commit: b229b6ca5abb Merge tag 'perf-tools-fixes-for-v6.1-2022-10-..
> git tree: upstream
> kernel config: https://syzkaller.appspot.com/x/.config?x=a66c6c673fb555e8
> dashboard link: https://syzkaller.appspot.com/bug?extid=7edb85bc97be9f350d90
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16d5817a880000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15d68cde880000
>
> If the result looks correct, please mark the issue as fixed by replying with:
>
> #syz fix: fs/jfs: fix shift exponent db_agl2size negative

It might well be possible. The patch improves the validation of
db_agl2size parameter, which affects the execution some frames up in
the crash stack trace:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/jfs/jfs_dmap.c?id=6d36c728bc2e2d632f4b0dea00df5532e20dfdab#n729

#syz fix: fs/jfs: fix shift exponent db_agl2size negative

>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
>