syzbot


KASAN: slab-out-of-bounds Write in __ext4_expand_extra_isize

Status: auto-closed as invalid on 2020/03/24 05:12
Reported-by: syzbot+0ad871b1af1ceef68c0a@syzkaller.appspotmail.com
First crash: 947d, last: 947d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-414 KASAN: slab-out-of-bounds Write in __ext4_expand_extra_isize 2 950d 1025d 0/1 auto-closed as invalid on 2020/03/21 10:22
upstream KASAN: slab-out-of-bounds Write in __ext4_expand_extra_isize 16 1052d 1395d 16/22 fixed on 2019/12/13 00:31
linux-4.19 KASAN: slab-out-of-bounds Write in __ext4_expand_extra_isize 1 1024d 1023d 0/1 auto-closed as invalid on 2020/01/07 20:38

Sample crash report:
EXT4-fs (sda1): Unrecognized mount option "smackfsroot=debug_want_extra_isize" or missing value
==================================================================
BUG: KASAN: slab-out-of-bounds in memset include/linux/string.h:332 [inline]
BUG: KASAN: slab-out-of-bounds in __ext4_expand_extra_isize+0x14f/0x220 fs/ext4/inode.c:5763
Write of size 634401054 at addr ffff8880825aa1a0 by task rs:main Q:Reg/6826

CPU: 0 PID: 6826 Comm: rs:main Q:Reg Not tainted 4.14.156-syzkaller #0
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+0x142/0x197 lib/dump_stack.c:58
 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393
 check_memory_region_inline mm/kasan/kasan.c:260 [inline]
 check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
 memset+0x24/0x40 mm/kasan/kasan.c:285
 memset include/linux/string.h:332 [inline]
 __ext4_expand_extra_isize+0x14f/0x220 fs/ext4/inode.c:5763
 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5815 [inline]
 ext4_mark_inode_dirty+0x664/0x860 fs/ext4/inode.c:5891
 ext4_dirty_inode+0x73/0xa0 fs/ext4/inode.c:5925
 __mark_inode_dirty+0x54c/0x1040 fs/fs-writeback.c:2144
 mark_inode_dirty include/linux/fs.h:2019 [inline]
 generic_write_end+0x1b7/0x290 fs/buffer.c:2218
 ext4_da_write_end+0x344/0x8e0 fs/ext4/inode.c:3187
 generic_perform_write+0x29f/0x480 mm/filemap.c:3058
------------[ cut here ]------------
WARNING: CPU: 1 PID: 7002 at mm/vmacache.c:64 vmacache_find+0x1db/0x270 mm/vmacache.c:64
Kernel panic - not syncing: panic_on_warn set ...

 __generic_file_write_iter+0x239/0x5b0 mm/filemap.c:3172
 ext4_file_write_iter+0x2ac/0xe90 fs/ext4/file.c:268
 call_write_iter include/linux/fs.h:1777 [inline]
 new_sync_write fs/read_write.c:469 [inline]
 __vfs_write+0x4a7/0x6b0 fs/read_write.c:482
 vfs_write+0x198/0x500 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xfd/0x230 fs/read_write.c:582
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x7f760cd4c19d
RSP: 002b:00007f760b2ed000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000000004b RCX: 00007f760cd4c19d
RDX: 000000000000004b RSI: 0000000001161a90 RDI: 0000000000000005
RBP: 0000000001161a90 R08: 6d203a5d33373137 R09: 6874617068637461
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 00007f760b2ed480 R14: 0000000000000001 R15: 0000000001161890

CPU: 1 PID: 7002 Comm: syz-executor.4 Not tainted 4.14.156-syzkaller #0
The buggy address belongs to the page:
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
page:ffffea0002096a80 count:2 mapcount:0 mapping:ffff8880a45d5560 index:0x427
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x142/0x197 lib/dump_stack.c:58
flags: 0x1fffc0000001074(referenced|dirty|lru|active|private)
raw: 01fffc0000001074 ffff8880a45d5560 0000000000000427 00000002ffffffff
 panic+0x1f9/0x42d kernel/panic.c:183
raw: ffffea000207c920 ffffea0002040aa0 ffff88807f2b7150 ffff88821b7321c0
page dumped because: kasan: bad access detected
page->mem_cgroup:ffff88821b7321c0

Memory state around the buggy address:
 __warn.cold+0x2f/0x2f kernel/panic.c:547
 ffff888082801f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888082801f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888082802000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 report_bug+0x216/0x254 lib/bug.c:186
                   ^
 ffff888082802080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
 fixup_bug arch/x86/kernel/traps.c:177 [inline]
 fixup_bug arch/x86/kernel/traps.c:172 [inline]
 do_error_trap+0x1bb/0x310 arch/x86/kernel/traps.c:295
 ffff888082802100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314
Modules linked in:
 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:963
RIP: 0010:vmacache_find+0x1db/0x270 mm/vmacache.c:64
CPU: 0 PID: 6826 Comm: rs:main Q:Reg Tainted: G    B           4.14.156-syzkaller #0
RSP: 0000:ffff8880587afdf8 EFLAGS: 00010297
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880a8e92000 task.stack: ffff888087df0000
RAX: ffff8880587a0600 RBX: 0000000000000000 RCX: ffff8880587a0e80
RIP: 0010:ip6t_do_table+0x289/0x1860 net/ipv6/netfilter/ip6_tables.c:293
RSP: 0018:ffff8880aee07828 EFLAGS: 00010246
RDX: 0000000000000000 RSI: 0000001b31020000 RDI: ffff888082884ef0
RBP: ffff8880587afe28 R08: 0000000000000001 R09: ffff8880587a0ea0
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1101097f647
RDX: 0000000000000000 RSI: ffff888084bfb200 RDI: ffff888084bfb238
R10: ffff8880587a0e80 R11: ffff8880587a0600 R12: dffffc0000000000
RBP: ffff8880aee079e0 R08: 0000000000000001 R09: 0000000000000000
R13: ffff8880965f0cc0 R14: ffff888082884eb0 R15: ffff8880587a0600
R10: 0000000000000001 R11: ffff8880a8e92000 R12: ffff8880aee07ab8
R13: ffff88809a5c3a40 R14: ffff8880aee07ab8 R15: ffff8880aee07ab8
 find_vma+0x21/0x150 mm/mmap.c:2155
FS:  00007f760b2ee700(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
 __do_page_fault+0x2fd/0xb80 arch/x86/mm/fault.c:1366
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000104d678 CR3: 0000000099c2b000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 do_page_fault+0x71/0x511 arch/x86/mm/fault.c:1495
 page_fault+0x45/0x50 arch/x86/entry/entry_64.S:1122
RIP: 0033:0x40e26e
RSP: 002b:00007ffc26c17540 EFLAGS: 00010202
 ip6table_security_hook+0x65/0x80 net/ipv6/netfilter/ip6table_security.c:45
 nf_hook_entry_hookfn include/linux/netfilter.h:108 [inline]
 nf_hook_slow+0xaf/0x1b0 net/netfilter/core.c:467
RAX: 000000000003271c RBX: 000000000003268d RCX: 00000000000324b0
 nf_hook.constprop.0+0x193/0x2c0 include/linux/netfilter.h:205
RDX: 0000001b31020000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000029 R08: 0000000000000001 R09: 0000000001135940
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
 NF_HOOK include/linux/netfilter.h:248 [inline]
 ndisc_send_skb+0x83b/0x11e0 net/ipv6/ndisc.c:483
R13: 00007ffc26c17570 R14: 000000000003264b R15: 00007ffc26c17580
 ndisc_send_rs+0x129/0x680 net/ipv6/ndisc.c:677
 addrconf_rs_timer+0x289/0x5a0 net/ipv6/addrconf.c:3757
 call_timer_fn+0x161/0x670 kernel/time/timer.c:1279
 expire_timers kernel/time/timer.c:1318 [inline]
 __run_timers kernel/time/timer.c:1636 [inline]
 __run_timers kernel/time/timer.c:1604 [inline]
 run_timer_softirq+0x5b7/0x1520 kernel/time/timer.c:1649
 __do_softirq+0x244/0x9a0 kernel/softirq.c:288
 invoke_softirq kernel/softirq.c:368 [inline]
 irq_exit+0x160/0x1b0 kernel/softirq.c:409
 exiting_irq arch/x86/include/asm/apic.h:648 [inline]
 smp_apic_timer_interrupt+0x146/0x5e0 arch/x86/kernel/apic/apic.c:1102
 apic_timer_interrupt+0x96/0xa0 arch/x86/entry/entry_64.S:792
 </IRQ>
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline]
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x95/0xe0 kernel/locking/spinlock.c:192
RSP: 0018:ffff888087df7720 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff10
RAX: 1ffffffff0ee2d21 RBX: 0000000000000282 RCX: 1ffffffff0f56888
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000282
RBP: ffff888087df7730 R08: ffff8880a8e92000 R09: 0000000000000000
R10: 0000000000000000 R11: ffff8880a8e92000 R12: ffffffff87820620
R13: ffff8880825aa1a0 R14: 0000000025d0311e R15: ffffffff81c1fb4f
 spin_unlock_irqrestore include/linux/spinlock.h:372 [inline]
 kasan_end_report+0x32/0x4f mm/kasan/report.c:174
 kasan_report_error mm/kasan/report.c:356 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0x130/0x2af mm/kasan/report.c:393
 check_memory_region_inline mm/kasan/kasan.c:260 [inline]
 check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
 memset+0x24/0x40 mm/kasan/kasan.c:285
 memset include/linux/string.h:332 [inline]
 __ext4_expand_extra_isize+0x14f/0x220 fs/ext4/inode.c:5763
 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5815 [inline]
 ext4_mark_inode_dirty+0x664/0x860 fs/ext4/inode.c:5891
 ext4_dirty_inode+0x73/0xa0 fs/ext4/inode.c:5925
 __mark_inode_dirty+0x54c/0x1040 fs/fs-writeback.c:2144
 mark_inode_dirty include/linux/fs.h:2019 [inline]
 generic_write_end+0x1b7/0x290 fs/buffer.c:2218
 ext4_da_write_end+0x344/0x8e0 fs/ext4/inode.c:3187
 generic_perform_write+0x29f/0x480 mm/filemap.c:3058
 __generic_file_write_iter+0x239/0x5b0 mm/filemap.c:3172
 ext4_file_write_iter+0x2ac/0xe90 fs/ext4/file.c:268
 call_write_iter include/linux/fs.h:1777 [inline]
 new_sync_write fs/read_write.c:469 [inline]
 __vfs_write+0x4a7/0x6b0 fs/read_write.c:482
 vfs_write+0x198/0x500 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xfd/0x230 fs/read_write.c:582
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x7f760cd4c19d
RSP: 002b:00007f760b2ed000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000000004b RCX: 00007f760cd4c19d
RDX: 000000000000004b RSI: 0000000001161a90 RDI: 0000000000000005
RBP: 0000000001161a90 R08: 6d203a5d33373137 R09: 6874617068637461
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 00007f760b2ed480 R14: 0000000000000001 R15: 0000000001161890
Code: 3c 11 00 0f 85 dc 14 00 00 48 8b b5 08 ff ff ff 89 c0 48 8b 56 38 48 8d 1c c2 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 dd 14 00 00 48 8b 03 48 89 85 c8 fe ff ff 0f 
RIP: ip6t_do_table+0x289/0x1860 net/ipv6/netfilter/ip6_tables.c:293 RSP: ffff8880aee07828
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2019/11/25 05:11 linux-4.14.y 43598c571e7e 598ca6c8 .config log report