batman_adv: batadv0: Interface activated: bond_slave_1 ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:347 [inline] BUG: KASAN: use-after-free in batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:717 [inline] BUG: KASAN: use-after-free in batadv_iv_ogm_queue_add+0x2c2/0xf80 net/batman-adv/bat_iv_ogm.c:813 Read of size 60 at addr ffff88808c5e5000 by task syz-executor.2/12115 CPU: 0 PID: 12115 Comm: syz-executor.2 Not tainted 4.14.154 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: audit: type=1400 audit(1574284193.184:184): avc: denied { sys_admin } for pid=12120 comm="syz-executor.3" capability=21 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 __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 memcpy+0x24/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:347 [inline] batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:717 [inline] batadv_iv_ogm_queue_add+0x2c2/0xf80 net/batman-adv/bat_iv_ogm.c:813 batadv_iv_ogm_schedule+0x9c5/0xd20 net/batman-adv/bat_iv_ogm.c:982 batadv_iv_iface_activate+0x16/0x20 net/batman-adv/bat_iv_ogm.c:2483 batadv_hardif_activate_interface.part.0.cold+0x24f/0x251 net/batman-adv/hard-interface.c:648 batadv_hardif_activate_interface net/batman-adv/hard-interface.c:627 [inline] batadv_hard_if_event+0x81b/0xd70 net/batman-adv/hard-interface.c:978 notifier_call_chain+0x111/0x1b0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x56/0x70 net/core/dev.c:1671 call_netdevice_notifiers net/core/dev.c:1687 [inline] dev_open net/core/dev.c:1411 [inline] dev_open+0xe0/0xf0 net/core/dev.c:1399 bond_enslave+0x99b/0x4c70 drivers/net/bonding/bond_main.c:1512 bond_do_ioctl+0x6e9/0x810 drivers/net/bonding/bond_main.c:3521 dev_ifsioc+0x5fc/0x7f0 net/core/dev_ioctl.c:354 dev_ioctl+0x23c/0xcb0 net/core/dev_ioctl.c:566 sock_do_ioctl+0x93/0xb0 net/socket.c:981 sock_ioctl+0x2a6/0x470 net/socket.c:1071 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45a639 RSP: 002b:00007f63c2437c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a639 RDX: 0000000020000240 RSI: 0000000000008990 RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f63c24386d4 R13: 00000000004c6790 R14: 00000000004dbb20 R15: 00000000ffffffff Allocated by task 12115: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x7a0 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] batadv_tvlv_realloc_packet_buff net/batman-adv/tvlv.c:288 [inline] batadv_tvlv_container_ogm_append+0x12b/0x480 net/batman-adv/tvlv.c:329 batadv_iv_ogm_schedule+0xafe/0xd20 net/batman-adv/bat_iv_ogm.c:945 batadv_iv_iface_activate+0x16/0x20 net/batman-adv/bat_iv_ogm.c:2483 batadv_hardif_activate_interface.part.0.cold+0x24f/0x251 net/batman-adv/hard-interface.c:648 batadv_hardif_activate_interface net/batman-adv/hard-interface.c:627 [inline] batadv_hard_if_event+0x81b/0xd70 net/batman-adv/hard-interface.c:978 notifier_call_chain+0x111/0x1b0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x56/0x70 net/core/dev.c:1671 call_netdevice_notifiers net/core/dev.c:1687 [inline] dev_open net/core/dev.c:1411 [inline] dev_open+0xe0/0xf0 net/core/dev.c:1399 bond_enslave+0x99b/0x4c70 drivers/net/bonding/bond_main.c:1512 bond_do_ioctl+0x6e9/0x810 drivers/net/bonding/bond_main.c:3521 dev_ifsioc+0x5fc/0x7f0 net/core/dev_ioctl.c:354 dev_ioctl+0x23c/0xcb0 net/core/dev_ioctl.c:566 sock_do_ioctl+0x93/0xb0 net/socket.c:981 sock_ioctl+0x2a6/0x470 net/socket.c:1071 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 8520: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 batadv_tvlv_realloc_packet_buff net/batman-adv/tvlv.c:295 [inline] batadv_tvlv_container_ogm_append+0x17e/0x480 net/batman-adv/tvlv.c:329 batadv_iv_ogm_schedule+0xafe/0xd20 net/batman-adv/bat_iv_ogm.c:945 batadv_iv_send_outstanding_bat_ogm_packet+0x4a1/0x680 net/batman-adv/bat_iv_ogm.c:1809 process_one_work+0x863/0x1600 kernel/workqueue.c:2114 worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248 kthread+0x319/0x430 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff88808c5e5000 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff88808c5e5000, ffff88808c5e5040) The buggy address belongs to the page: page:ffffea0002317940 count:1 mapcount:0 mapping:ffff88808c5e5000 index:0xffff88808c5e5f00 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff88808c5e5000 ffff88808c5e5f00 0000000100000019 raw: ffffea000258ba20 ffffea000235b920 ffff8880aa800340 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808c5e4f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808c5e4f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808c5e5000: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88808c5e5080: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ffff88808c5e5100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== XFS (loop3): Invalid superblock magic number audit: type=1804 audit(1574284194.414:185): pid=12164 uid=0 auid=4294967295 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir017186562/syzkaller.aX4jYi/82/bus" dev="sda1" ino=16958 res=1 XFS (loop1): Invalid superblock magic number