batman_adv: batadv0: Removing interface: batadv_slave_1 ================================================================== device bridge_slave_1 left promiscuous mode bridge0: port 2(bridge_slave_1) entered disabled state BUG: KASAN: use-after-free in batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:711 [inline] at addr ffff8800b4d34100 BUG: KASAN: use-after-free in batadv_iv_ogm_queue_add+0x771/0x1150 net/batman-adv/bat_iv_ogm.c:828 at addr ffff8800b4d34100 Read of size 132 by task kworker/u4:5/2903 CPU: 0 PID: 2903 Comm: kworker/u4:5 Not tainted 4.7.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_send_outstanding_bat_ogm_packet 0000000000000000 ffff8800b236f998 ffffffff82e49e02 ffff8800b4d34183 ffff8800b236fa28 ffff8800b4d34100 ffff88012bc00000 ffff8800b4d341c0 ffff8800b236fa18 ffffffff81745c18 0000000000000286 0000000000000003 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0x136/0x1d4 lib/dump_stack.c:51 [] object_err mm/kasan/report.c:139 [inline] [] print_address_description mm/kasan/report.c:180 [inline] [] kasan_report_error+0x1e8/0x5b0 mm/kasan/report.c:276 [] kasan_report+0x34/0x40 mm/kasan/report.c:298 [] check_memory_region_inline mm/kasan/kasan.c:285 [inline] [] check_memory_region+0x13d/0x1a0 mm/kasan/kasan.c:299 [] memcpy+0x23/0x50 mm/kasan/kasan.c:334 [] batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:711 [inline] [] batadv_iv_ogm_queue_add+0x771/0x1150 net/batman-adv/bat_iv_ogm.c:828 [] batadv_iv_ogm_schedule+0x912/0xc70 net/batman-adv/bat_iv_ogm.c:984 [] batadv_schedule_bat_ogm net/batman-adv/send.c:448 [inline] [] batadv_send_outstanding_bat_ogm_packet+0x2f1/0x410 net/batman-adv/send.c:636 [] process_one_work+0x67c/0x14f0 kernel/workqueue.c:2096 [] worker_thread+0xda/0xf10 kernel/workqueue.c:2230 [] kthread+0x209/0x2d0 kernel/kthread.c:209 [] ret_from_fork+0x1f/0x40 arch/x86/entry/entry_64.S:389 Object at ffff8800b4d34100, in cache kmalloc-node Object freed, allocated with size 132 bytes Allocation: PID = 2903 [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:67 [] save_stack mm/kasan/kasan.c:476 [inline] [] set_track mm/kasan/kasan.c:488 [inline] [] kasan_kmalloc+0x11d/0x1b0 mm/kasan/kasan.c:586 [] __do_kmalloc mm/slab.c:3773 [inline] [] __kmalloc+0x162/0x470 mm/slab.c:3782 [] kmalloc include/linux/slab.h:483 [inline] [] batadv_tvlv_realloc_packet_buff net/batman-adv/main.c:885 [inline] [] batadv_tvlv_container_ogm_append+0x117/0x470 net/batman-adv/main.c:926 [] batadv_iv_ogm_schedule+0x9ea/0xc70 net/batman-adv/bat_iv_ogm.c:947 [] batadv_schedule_bat_ogm net/batman-adv/send.c:448 [inline] [] batadv_send_outstanding_bat_ogm_packet+0x2f1/0x410 net/batman-adv/send.c:636 [] process_one_work+0x67c/0x14f0 kernel/workqueue.c:2096 [] worker_thread+0xda/0xf10 kernel/workqueue.c:2230 [] kthread+0x209/0x2d0 kernel/kthread.c:209 [] ret_from_fork+0x1f/0x40 arch/x86/entry/entry_64.S:389 Deallocation: PID = 21 [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:67 [] save_stack mm/kasan/kasan.c:476 [inline] [] set_track mm/kasan/kasan.c:488 [inline] [] kasan_slab_free+0xd7/0x180 mm/kasan/kasan.c:540 [] __cache_free mm/slab.c:3551 [inline] [] kfree+0xd3/0x2c0 mm/slab.c:3868 [] batadv_iv_ogm_iface_disable+0x34/0x70 net/batman-adv/bat_iv_ogm.c:379 [] batadv_hardif_disable_interface+0x31c/0xbb0 net/batman-adv/hard-interface.c:602 [] batadv_softif_destroy_netlink+0xa1/0xc0 net/batman-adv/soft-interface.c:1040 [] default_device_exit_batch+0x241/0x3d0 net/core/dev.c:8108 [] ops_exit_list.isra.0+0xd6/0x120 net/core/net_namespace.c:137 [] cleanup_net+0x2d0/0x540 net/core/net_namespace.c:431 [] process_one_work+0x67c/0x14f0 kernel/workqueue.c:2096 [] worker_thread+0xda/0xf10 kernel/workqueue.c:2230 [] kthread+0x209/0x2d0 kernel/kthread.c:209 [] ret_from_fork+0x1f/0x40 arch/x86/entry/entry_64.S:389 Memory state around the buggy address: ffff8800b4d34000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8800b4d34080: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8800b4d34100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8800b4d34180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8800b4d34200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access[ 420.611717] general protection fault: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 0 PID: 2903 Comm: kworker/u4:5 Tainted: G B 4.7.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_send_outstanding_bat_ogm_packet task: ffff8800b2360640 ti: ffff8800b2368000 task.ti: ffff8800b2368000 RIP: 0010:[] [] batadv_iv_ogm_queue_add+0x2f/0x1150 net/batman-adv/bat_iv_ogm.c:793 RSP: 0018:ffff8800b236faa8 EFLAGS: 00010292 RAX: dffffc0000000000 RBX: ffff8800a35a9280 RCX: ffff8800ba05e580 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: ffff8800b236fb48 R08: ffff8800a35a9280 R09: 0000000000000001 R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000084 R13: 0000000000000000 R14: ffff8800ba05e580 R15: ffff8800b54ad080 FS: 0000000000000000(0000) GS:ffff88012c000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000562c1786dd28 CR3: 00000000aef00000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: 0000000000000000 0000000000000000 0000000000000002 0000000000000000 ffff8800b236fb48 0000000000000286 0000000000000000 ffffffff85cc2e41 ffff880000000000 ffff8800ba05e580 ffff8800b54ad150 ffff8800ba05e580 Call Trace: [] batadv_iv_ogm_schedule+0x912/0xc70 net/batman-adv/bat_iv_ogm.c:984 [] batadv_schedule_bat_ogm net/batman-adv/send.c:448 [inline] [] batadv_send_outstanding_bat_ogm_packet+0x2f1/0x410 net/batman-adv/send.c:636 [] process_one_work+0x67c/0x14f0 kernel/workqueue.c:2096 [] worker_thread+0xda/0xf10 kernel/workqueue.c:2230 [] kthread+0x209/0x2d0 kernel/kthread.c:209 [] ret_from_fork+0x1f/0x40 arch/x86/entry/entry_64.S:389 Code: 00 00 00 fc ff df 55 48 89 e5 41 57 49 89 ff 48 8d 7e 03 41 56 41 55 49 89 f5 41 54 41 89 d4 48 89 fa 48 c1 ea 03 53 48 83 ec 78 <0f> b6 04 02 48 89 fa 48 89 4d a8 83 e2 07 4c 89 45 b8 44 89 4d RIP [] batadv_iv_ogm_queue_add+0x2f/0x1150 net/batman-adv/bat_iv_ogm.c:782 RSP ---[ end trace f344a103df998cfd ]---