KASAN: use-after-free Read in ntfs_read_locked_inode

27 views
Skip to first unread message

syzbot

unread,
Apr 5, 2018, 12:02:01 AM4/5/18
to an...@tuxera.com, linux-...@vger.kernel.org, linux-n...@lists.sourceforge.net, syzkall...@googlegroups.com
Hello,

syzbot hit the following crash on upstream commit
3e968c9f1401088abc9a19ae6ff571644d37a355 (Wed Apr 4 21:19:24 2018 +0000)
Merge tag 'ext4_for_linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
syzbot dashboard link:
https://syzkaller.appspot.com/bug?extid=19b469021157c136116a

C reproducer: https://syzkaller.appspot.com/x/repro.c?id=5682455868604416
syzkaller reproducer:
https://syzkaller.appspot.com/x/repro.syz?id=5679121900240896
Raw console output:
https://syzkaller.appspot.com/x/log.txt?id=5751565918928896
Kernel config:
https://syzkaller.appspot.com/x/.config?id=9118669095563550941
compiler: gcc (GCC) 7.1.1 20170620

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+19b469...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

ntfs: volume version 3.1.
ntfs: volume version 3.1.
ntfs: volume version 3.1.
ntfs: volume version 3.1.
==================================================================
BUG: KASAN: use-after-free in ntfs_read_locked_inode+0x47fe/0x51b0
fs/ntfs/inode.c:670
Read of size 8 at addr ffff8801becc42e8 by task syzkaller675411/4496

CPU: 0 PID: 4496 Comm: syzkaller675411 Not tainted 4.16.0+ #15
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1a7/0x27d lib/dump_stack.c:53
print_address_description+0x73/0x250 mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report+0x23c/0x360 mm/kasan/report.c:412
__asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:443
ntfs_read_locked_inode+0x47fe/0x51b0 fs/ntfs/inode.c:670
ntfs_iget+0x1ab/0x240 fs/ntfs/inode.c:190
load_and_init_quota fs/ntfs/super.c:1406 [inline]
load_system_files+0x5f06/0x6c80 fs/ntfs/super.c:2117
ntfs_fill_super+0x1485/0x2fb0 fs/ntfs/super.c:2908
mount_bdev+0x2b7/0x370 fs/super.c:1119
ntfs_mount+0x34/0x40 fs/ntfs/super.c:3065
mount_fs+0x66/0x2d0 fs/super.c:1222
vfs_kern_mount.part.26+0xc6/0x4a0 fs/namespace.c:1037
vfs_kern_mount fs/namespace.c:2514 [inline]
do_new_mount fs/namespace.c:2517 [inline]
do_mount+0xea4/0x2b90 fs/namespace.c:2847
ksys_mount+0xab/0x120 fs/namespace.c:3063
SYSC_mount fs/namespace.c:3077 [inline]
SyS_mount+0x39/0x50 fs/namespace.c:3074
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x44597a
RSP: 002b:00007ffe9dfbd7d8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000a80 RCX: 000000000044597a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffe9dfbd850
RBP: 0000000000000003 R08: 0000000020077a00 R09: 000000000000000a
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000004
R13: 000000000000ab33 R14: 0000000000000000 R15: 0000000000000000

The buggy address belongs to the page:
page:ffffea0006fb3100 count:0 mapcount:0 mapping:0000000000000000 index:0x1
flags: 0x2fffc0000000000()
raw: 02fffc0000000000 0000000000000000 0000000000000001 00000000ffffffff
raw: dead000000000100 dead000000000200 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8801becc4180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8801becc4200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> ffff8801becc4280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8801becc4300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8801becc4380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
If you want to test a patch for this bug, please reply with:
#syz test: git://repo/address.git branch
and provide the patch inline or as an attachment.
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.

syzbot

unread,
Nov 27, 2019, 8:20:01 AM11/27/19
to an...@tuxera.com, del...@gmx.de, je...@parisc-linux.org, kees...@chromium.org, linux-...@vger.kernel.org, linux-n...@lists.sourceforge.net, linux-...@vger.kernel.org, lu...@amacapital.net, syzkall...@googlegroups.com, w...@chromium.org
syzbot has bisected this bug to:

commit 910cd32e552ea09caa89cdbe328e468979b030dd
Author: Helge Deller <del...@gmx.de>
Date: Wed Mar 30 12:14:31 2016 +0000

parisc: Fix and enable seccomp filter support

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=143090dee00000
start commit: 3e968c9f Merge tag 'ext4_for_linus' of git://git.kernel.or..
git tree: upstream
final crash: https://syzkaller.appspot.com/x/report.txt?x=163090dee00000
console output: https://syzkaller.appspot.com/x/log.txt?x=123090dee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=7e8c053ac965e0dd
dashboard link: https://syzkaller.appspot.com/bug?extid=19b469021157c136116a
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=142d219b800000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=143029db800000

Reported-by: syzbot+19b469...@syzkaller.appspotmail.com
Fixes: 910cd32e552e ("parisc: Fix and enable seccomp filter support")

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

Dmitry Vyukov

unread,
Nov 27, 2019, 9:02:27 AM11/27/19
to syzbot, an...@tuxera.com, del...@gmx.de, je...@parisc-linux.org, Kees Cook, LKML, linux-n...@lists.sourceforge.net, linux-...@vger.kernel.org, Andy Lutomirski, syzkaller-bugs, Will Drewry, Al Viro
On Wed, Nov 27, 2019 at 2:20 PM syzbot
<syzbot+19b469...@syzkaller.appspotmail.com> wrote:
>
> syzbot has bisected this bug to:
>
> commit 910cd32e552ea09caa89cdbe328e468979b030dd
> Author: Helge Deller <del...@gmx.de>
> Date: Wed Mar 30 12:14:31 2016 +0000
>
> parisc: Fix and enable seccomp filter support

FWIW this commit somehow has an effect on x86 binary. I can reproduce
it. I've collected what I know so far here:
https://github.com/google/syzkaller/issues/1271#issuecomment-559093018
Well, actually it does not look like effect of this commit but rather
non-deterministic/hermetic kernel build.
+Al for affected x86 build bullshit

> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=143090dee00000
> start commit: 3e968c9f Merge tag 'ext4_for_linus' of git://git.kernel.or..
> git tree: upstream
> final crash: https://syzkaller.appspot.com/x/report.txt?x=163090dee00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=123090dee00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=7e8c053ac965e0dd
> dashboard link: https://syzkaller.appspot.com/bug?extid=19b469021157c136116a
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=142d219b800000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=143029db800000
>
> Reported-by: syzbot+19b469...@syzkaller.appspotmail.com
> Fixes: 910cd32e552e ("parisc: Fix and enable seccomp filter support")
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/00000000000093ca84059853da04%40google.com.

syzbot

unread,
Aug 26, 2020, 6:37:08 AM8/26/20
to an...@tuxera.com, dan...@iogearbox.net, del...@gmx.de, dvy...@google.com, je...@parisc-linux.org, kees...@chromium.org, linux-...@vger.kernel.org, linux-n...@lists.sourceforge.net, linux-...@vger.kernel.org, lu...@amacapital.net, s...@google.com, songliu...@fb.com, syzkall...@googlegroups.com, vi...@zeniv.linux.org.uk, w...@chromium.org
syzbot suspects this issue was fixed by commit:

commit f7c6cb1d9728dea9d9f131ef57303d6821afb0f8
Author: Stanislav Fomichev <s...@google.com>
Date: Wed Jul 29 00:31:03 2020 +0000

bpf: Expose socket storage to BPF_PROG_TYPE_CGROUP_SOCK

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16480fa9900000
start commit: 3e968c9f Merge tag 'ext4_for_linus' of git://git.kernel.or..
git tree: upstream
If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: bpf: Expose socket storage to BPF_PROG_TYPE_CGROUP_SOCK
Reply all
Reply to author
Forward
0 new messages