xt_CT: You must specify a L4 protocol and not use inversions on it ================================================================== BUG: KASAN: use-after-free in br_dev_xmit+0x12b3/0x13e0 net/bridge/br_device.c:68 Read of size 2 at addr ffff8880a92bb30e by task syz-executor.2/26831 CPU: 0 PID: 26831 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load_n_noabort+0x8b/0xa0 mm/kasan/report.c:443 br_dev_xmit+0x12b3/0x13e0 net/bridge/br_device.c:68 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 __dev_queue_xmit+0x269d/0x2e00 net/core/dev.c:3838 vlan_dev_hard_start_xmit+0x38f/0x800 net/8021q/vlan_dev.c:131 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 __dev_queue_xmit+0x269d/0x2e00 net/core/dev.c:3838 bond_dev_queue_xmit+0x103/0x380 drivers/net/bonding/bond_main.c:256 bond_xmit_slave_id+0x1f5/0x510 drivers/net/bonding/bond_main.c:3861 bond_xmit_roundrobin drivers/net/bonding/bond_main.c:3938 [inline] __bond_start_xmit drivers/net/bonding/bond_main.c:4203 [inline] bond_start_xmit+0xd9b/0x14f0 drivers/net/bonding/bond_main.c:4237 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 __dev_queue_xmit+0x269d/0x2e00 net/core/dev.c:3838 neigh_hh_output include/net/neighbour.h:491 [inline] neigh_output include/net/neighbour.h:499 [inline] ip6_finish_output2+0xde7/0x2290 net/ipv6/ip6_output.c:120 ip6_finish_output+0x89b/0x10f0 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209 dst_output include/net/dst.h:455 [inline] NF_HOOK include/linux/netfilter.h:289 [inline] ndisc_send_skb+0xa24/0x1720 net/ipv6/ndisc.c:491 ndisc_send_rs+0x131/0x690 net/ipv6/ndisc.c:685 addrconf_rs_timer+0x384/0x6a0 net/ipv6/addrconf.c:3835 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:console_unlock+0xe7b/0x1110 kernel/printk/printk.c:2468 Code: ff df 48 c1 e8 03 80 3c 08 00 0f 85 66 02 00 00 48 83 3d cf c3 a3 08 00 0f 84 9e 00 00 00 e8 ac c6 14 00 48 8b 7c 24 30 57 9d <0f> 1f 44 00 00 e9 9b fc ff ff e8 96 c6 14 00 0f 0b e8 8f c6 14 00 RSP: 0018:ffff88806b88f4d0 EFLAGS: 00000216 ORIG_RAX: ffffffffffffff13 RAX: 0000000000040000 RBX: 0000000000000200 RCX: ffffc9000b4b9000 RDX: 00000000000120bf RSI: ffffffff814dbec4 RDI: 0000000000000216 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff8446efa0 R13: 0000000000000052 R14: 0000000000000000 R15: ffffffff8a6dd090 vprintk_emit+0x2d1/0x740 kernel/printk/printk.c:1965 vprintk_func+0x79/0x180 kernel/printk/printk_safe.c:405 printk+0xba/0xed kernel/printk/printk.c:2040 xt_ct_set_helper net/netfilter/xt_CT.c:85 [inline] xt_ct_tg_check.cold+0x32/0x16c net/netfilter/xt_CT.c:253 xt_ct_tg_check_v0+0x1a1/0x280 net/netfilter/xt_CT.c:302 xt_check_target+0x26c/0x650 net/netfilter/x_tables.c:1023 check_target net/ipv6/netfilter/ip6_tables.c:532 [inline] find_check_entry.constprop.0+0x7f1/0x9e0 net/ipv6/netfilter/ip6_tables.c:575 translate_table+0xc46/0x16a0 net/ipv6/netfilter/ip6_tables.c:737 do_replace net/ipv6/netfilter/ip6_tables.c:1156 [inline] do_ip6t_set_ctl+0x29d/0x430 net/ipv6/netfilter/ip6_tables.c:1686 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x6f/0xc0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x103/0x160 net/ipv6/ipv6_sockglue.c:945 tcp_setsockopt+0x86/0xd0 net/ipv4/tcp.c:3108 __sys_setsockopt+0x14d/0x240 net/socket.c:2013 __do_sys_setsockopt net/socket.c:2024 [inline] __se_sys_setsockopt net/socket.c:2021 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2021 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fbca3a525a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbca23a5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fbca3b74050 RCX: 00007fbca3a525a9 RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000007 RBP: 00007fbca3aad580 R08: 0000000000000528 R09: 0000000000000000 R10: 00000000200001c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe2566f1ef R14: 00007fbca23a5300 R15: 0000000000022000 Allocated by task 26831: __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3703 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0xae/0x560 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:995 [inline] ndisc_alloc_skb+0x134/0x320 net/ipv6/ndisc.c:403 ndisc_send_rs+0x33a/0x690 net/ipv6/ndisc.c:669 addrconf_rs_timer+0x384/0x6a0 net/ipv6/addrconf.c:3835 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 Freed by task 26831: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 skb_free_head net/core/skbuff.c:563 [inline] pskb_expand_head+0x327/0xf20 net/core/skbuff.c:1506 __skb_cow include/linux/skbuff.h:2977 [inline] skb_cow_head include/linux/skbuff.h:3011 [inline] __vlan_insert_inner_tag include/linux/if_vlan.h:346 [inline] vlan_insert_inner_tag include/linux/if_vlan.h:416 [inline] vlan_insert_tag include/linux/if_vlan.h:441 [inline] vlan_insert_tag_set_proto include/linux/if_vlan.h:460 [inline] __allowed_ingress net/bridge/br_vlan.c:437 [inline] br_allowed_ingress+0x376/0xed0 net/bridge/br_vlan.c:514 br_dev_xmit+0x3e5/0x13e0 net/bridge/br_device.c:64 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 __dev_queue_xmit+0x269d/0x2e00 net/core/dev.c:3838 vlan_dev_hard_start_xmit+0x38f/0x800 net/8021q/vlan_dev.c:131 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 __dev_queue_xmit+0x269d/0x2e00 net/core/dev.c:3838 bond_dev_queue_xmit+0x103/0x380 drivers/net/bonding/bond_main.c:256 bond_xmit_slave_id+0x1f5/0x510 drivers/net/bonding/bond_main.c:3861 bond_xmit_roundrobin drivers/net/bonding/bond_main.c:3938 [inline] __bond_start_xmit drivers/net/bonding/bond_main.c:4203 [inline] bond_start_xmit+0xd9b/0x14f0 drivers/net/bonding/bond_main.c:4237 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 __dev_queue_xmit+0x269d/0x2e00 net/core/dev.c:3838 neigh_hh_output include/net/neighbour.h:491 [inline] neigh_output include/net/neighbour.h:499 [inline] ip6_finish_output2+0xde7/0x2290 net/ipv6/ip6_output.c:120 ip6_finish_output+0x89b/0x10f0 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209 dst_output include/net/dst.h:455 [inline] NF_HOOK include/linux/netfilter.h:289 [inline] ndisc_send_skb+0xa24/0x1720 net/ipv6/ndisc.c:491 ndisc_send_rs+0x131/0x690 net/ipv6/ndisc.c:685 addrconf_rs_timer+0x384/0x6a0 net/ipv6/addrconf.c:3835 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880a92bb300 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 14 bytes inside of 512-byte region [ffff8880a92bb300, ffff8880a92bb500) The buggy address belongs to the page: page:ffffea0002a4aec0 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff8880a92bbd00 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00024314c8 ffffea00023400c8 ffff88813bff0940 raw: ffff8880a92bbd00 ffff8880a92bb080 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a92bb200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a92bb280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a92bb300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a92bb380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a92bb400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: df 48 c1 fisttps -0x3f(%rax) 3: e8 03 80 3c 08 callq 0x83c800b 8: 00 0f add %cl,(%rdi) a: 85 66 02 test %esp,0x2(%rsi) d: 00 00 add %al,(%rax) f: 48 83 3d cf c3 a3 08 cmpq $0x0,0x8a3c3cf(%rip) # 0x8a3c3e6 16: 00 17: 0f 84 9e 00 00 00 je 0xbb 1d: e8 ac c6 14 00 callq 0x14c6ce 22: 48 8b 7c 24 30 mov 0x30(%rsp),%rdi 27: 57 push %rdi 28: 9d popfq * 29: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2e: e9 9b fc ff ff jmpq 0xfffffcce 33: e8 96 c6 14 00 callq 0x14c6ce 38: 0f 0b ud2 3a: e8 8f c6 14 00 callq 0x14c6ce