Re: [syzbot] KASAN: use-after-free Read in ntfs_attr_find

From: Siddh Raman Pant
Date: Thu Aug 25 2022 - 14:32:59 EST


On Thu, 25 Aug 2022 23:55:35 +0530 syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: c40e8341e3b3 Merge tag 'cgroup-for-6.0-rc2-fixes' of git:/..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=161114c7080000
> kernel config: https://syzkaller.appspot.com/x/.config?x=911efaff115942bb
> dashboard link: https://syzkaller.appspot.com/bug?extid=5f8dcabe4a3b2c51c607
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14dd8265080000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11f30033080000
>
> The issue was bisected to:
>
> commit 38c9c22a85aeed28d0831f230136e9cf6fa2ed44
> Author: ChenXiaoSong chenxiaosong2@xxxxxxxxxx>
> Date: Thu Jul 7 10:53:29 2022 +0000
>
> ntfs: fix use-after-free in ntfs_ucsncmp()
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16f6cd8d080000
> final oops: https://syzkaller.appspot.com/x/report.txt?x=15f6cd8d080000
> console output: https://syzkaller.appspot.com/x/log.txt?x=11f6cd8d080000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+5f8dcabe4a3b2c51c607@xxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: 38c9c22a85ae ("ntfs: fix use-after-free in ntfs_ucsncmp()")

This is incorrect. The issue is caused by:
9b75450d6c58 ("fs/ntfs3: Fix memory leak if fill_super failed")

The fix for this can be seen by the two different patches tested by syzbot, which
are listed on the dashboard.

Thanks,
Siddh