syzbot


KASAN: slab-out-of-bounds Read in tcp_out_of_resources

Status: closed as invalid on 2019/10/03 03:38
Subsystems: net
[Documentation on labels]
First crash: 1975d, last: 1975d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in tcp_out_of_resources (2) net 1 1602d 1602d 0/28 auto-closed as invalid on 2020/12/08 08:32

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in atomic_read include/asm-generic/atomic-instrumented.h:26 [inline]
BUG: KASAN: slab-out-of-bounds in refcount_read include/linux/refcount.h:43 [inline]
BUG: KASAN: slab-out-of-bounds in check_net include/net/net_namespace.h:259 [inline]
BUG: KASAN: slab-out-of-bounds in tcp_out_of_resources+0x317/0x400 net/ipv4/tcp_timer.c:112
Read of size 4 at addr ffff8880a913c084 by task syz-executor.2/8122

CPU: 1 PID: 8122 Comm: syz-executor.2 Not tainted 5.3.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x172/0x1f0 lib/dump_stack.c:113
 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351
 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482
 kasan_report+0x12/0x17 mm/kasan/common.c:618
 check_memory_region_inline mm/kasan/generic.c:185 [inline]
 check_memory_region+0x134/0x1a0 mm/kasan/generic.c:192
 __kasan_check_read+0x11/0x20 mm/kasan/common.c:92
 atomic_read include/asm-generic/atomic-instrumented.h:26 [inline]
 refcount_read include/linux/refcount.h:43 [inline]
 check_net include/net/net_namespace.h:259 [inline]
 tcp_out_of_resources+0x317/0x400 net/ipv4/tcp_timer.c:112
 tcp_probe_timer net/ipv4/tcp_timer.c:367 [inline]
 tcp_write_timer_handler+0x559/0x8d0 net/ipv4/tcp_timer.c:596
 tcp_write_timer+0xa8/0x1e0 net/ipv4/tcp_timer.c:612
 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1322
 expire_timers kernel/time/timer.c:1366 [inline]
 __run_timers kernel/time/timer.c:1685 [inline]
 __run_timers kernel/time/timer.c:1653 [inline]
 run_timer_softirq+0x697/0x17a0 kernel/time/timer.c:1698
 __do_softirq+0x262/0x98c kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:373 [inline]
 irq_exit+0x19b/0x1e0 kernel/softirq.c:413
 exiting_irq arch/x86/include/asm/apic.h:537 [inline]
 smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1133
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830
 </IRQ>
RIP: 0010:ext4_add_entry+0x7b6/0xdf0 fs/ext4/namei.c:2214
Code: e8 8f 6a c6 ff 8b 83 60 ff ff ff 44 89 fe 44 8d 60 01 44 89 e7 44 89 a3 60 ff ff ff e8 d3 3d 74 ff 45 39 fc 0f 83 16 02 00 00 <e8> c5 3c 74 ff 44 89 e6 ba 02 00 00 00 4c 89 ef 41 b8 a6 08 00 00
RSP: 0018:ffff8880508c7bb0 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000001 RBX: ffff8880508c7cc0 RCX: ffffffff81fe35a0
RDX: 1ffff110136eae2c RSI: 0000000000000000 RDI: 0000000000000005
RBP: ffff8880508c7ce8 R08: ffff88808da74080 R09: ffffed100a205e1b
R10: ffffed100a205e1a R11: ffff88805102f0d7 R12: 0000000000000000
R13: ffff88805102f270 R14: 0000000000000000 R15: 0000000000000001
 ext4_add_nondir+0x28/0x90 fs/ext4/namei.c:2553
 ext4_symlink+0xba6/0xf10 fs/ext4/namei.c:3331
 vfs_symlink fs/namei.c:4127 [inline]
 vfs_symlink+0x373/0x5a0 fs/namei.c:4113
 do_symlinkat+0x22b/0x290 fs/namei.c:4154
 __do_sys_symlink fs/namei.c:4173 [inline]
 __se_sys_symlink fs/namei.c:4171 [inline]
 __x64_sys_symlink+0x59/0x80 fs/namei.c:4171
 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4595a7
Code: 0f 1f 00 b8 5c 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 bd ba fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 9d ba fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffdc8715d48 EFLAGS: 00000206 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004595a7
RDX: 00007ffdc8715de7 RSI: 00000000004bf0f0 RDI: 00007ffdc8715dd0
RBP: 0000000000000000 R08: 0000000000000800 R09: 0000000000000017
R10: 0000000000000075 R11: 0000000000000206 R12: 0000000000000000
R13: 00007ffdc8715d80 R14: 0000000000000000 R15: 00007ffdc8715d90

Allocated by task 7690:
 save_stack+0x23/0x90 mm/kasan/common.c:69
 set_track mm/kasan/common.c:77 [inline]
 __kasan_kmalloc mm/kasan/common.c:493 [inline]
 __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:466
 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:507
 __do_kmalloc mm/slab.c:3655 [inline]
 __kmalloc_track_caller+0x15f/0x760 mm/slab.c:3670
 kmemdup+0x27/0x60 mm/util.c:120
 kmemdup include/linux/string.h:432 [inline]
 __addrconf_sysctl_register+0xae/0x430 net/ipv6/addrconf.c:6826
 addrconf_sysctl_register net/ipv6/addrconf.c:6891 [inline]
 addrconf_sysctl_register+0x140/0x1e0 net/ipv6/addrconf.c:6880
 ipv6_add_dev net/ipv6/addrconf.c:443 [inline]
 ipv6_add_dev+0x9dd/0x10b0 net/ipv6/addrconf.c:363
 addrconf_notify+0x97d/0x23b0 net/ipv6/addrconf.c:3491
 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95
 __raw_notifier_call_chain kernel/notifier.c:396 [inline]
 raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403
 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749
 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline]
 call_netdevice_notifiers net/core/dev.c:1775 [inline]
 register_netdevice+0xa5c/0xff0 net/core/dev.c:8757
 __ip_tunnel_create+0x36b/0x530 net/ipv4/ip_tunnel.c:269
 ip_tunnel_init_net+0x375/0x9e0 net/ipv4/ip_tunnel.c:1060
 erspan_init_net+0x2a/0x30 net/ipv4/ip_gre.c:1589
 ops_init+0xb3/0x420 net/core/net_namespace.c:137
 setup_net+0x2cc/0x880 net/core/net_namespace.c:334
 copy_net_ns+0x290/0x41f net/core/net_namespace.c:475
 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:103
 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:202
 ksys_unshare+0x444/0x980 kernel/fork.c:2831
 __do_sys_unshare kernel/fork.c:2899 [inline]
 __se_sys_unshare kernel/fork.c:2897 [inline]
 __x64_sys_unshare+0x31/0x40 kernel/fork.c:2897
 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8880a913c1c0
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 316 bytes to the left of
 4096-byte region [ffff8880a913c1c0, ffff8880a913d1c0)
The buggy address belongs to the page:
page:ffffea0002a44f00 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea000240ff08 ffffea00025a4588 ffff8880aa402000
raw: 0000000000000000 ffff8880a913c1c0 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a913bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a913c000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880a913c080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff8880a913c100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a913c180: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/02 20:02 net-old e1e54ec7fb55 14544a56 .config console log report ci-upstream-net-this-kasan-gce
* Struck through repros no longer work on HEAD.