================================================================== BUG: KASAN: slab-out-of-bounds in __ipv6_addr_type+0x26c/0x290 net/ipv6/addrconf_core.c:68 Read of size 4 at addr ffff8800b3b7d038 by task syz-executor.3/5967 CPU: 0 PID: 5967 Comm: syz-executor.3 Not tainted 4.4.174+ #4 0000000000000000 f72334a7f36cb979 ffff8800a2ad6da0 ffffffff81aad1a1 0000000000000000 ffffea0002cedf00 ffff8800b3b7d038 0000000000000004 ffff8800b3b7cd80 ffff8800a2ad6dd8 ffffffff81490120 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_address_description+0x6f/0x21b mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report mm/kasan/report.c:408 [inline] [] kasan_report.cold+0x8c/0x2be mm/kasan/report.c:393 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:428 [] __ipv6_addr_type+0x26c/0x290 net/ipv6/addrconf_core.c:68 [] ipv6_addr_type include/net/ipv6.h:330 [inline] [] ip6_tnl_xmit2+0x2ac/0x2320 net/ipv6/ip6_tunnel.c:988 [] ip4ip6_tnl_xmit net/ipv6/ip6_tunnel.c:1134 [inline] [] ip6_tnl_xmit+0xa09/0xe00 net/ipv6/ip6_tunnel.c:1212 [] __netdev_start_xmit include/linux/netdevice.h:3750 [inline] [] netdev_start_xmit include/linux/netdevice.h:3759 [inline] [] xmit_one net/core/dev.c:2781 [inline] [] dev_hard_start_xmit+0x7c1/0x11e0 net/core/dev.c:2797 binder: BINDER_SET_CONTEXT_MGR already set binder: 5969:5972 ioctl 40046207 0 returned -16 [] __dev_queue_xmit+0x164b/0x1bb0 net/core/dev.c:3229 binder: 5969:5972 ioctl c0306201 20000040 returned -14 [] dev_queue_xmit+0x18/0x20 net/core/dev.c:3263 [] neigh_direct_output+0x16/0x20 net/core/neighbour.c:1369 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip_finish_output2+0x6a2/0x1280 net/ipv4/ip_output.c:213 [] ip_finish_output+0x8b2/0xc60 net/ipv4/ip_output.c:288 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip_output+0x227/0x4c0 net/ipv4/ip_output.c:362 [] dst_output include/net/dst.h:498 [inline] [] ip_local_out+0x9c/0x180 net/ipv4/ip_output.c:119 audit_printk_skb: 12 callbacks suppressed audit: type=1400 audit(1556050558.552:79): avc: denied { create } for pid=5973 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1556050558.552:80): avc: denied { write } for pid=5973 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 [] ip_send_skb+0x3e/0xc0 net/ipv4/ip_output.c:1453 [] udp_send_skb+0x4fd/0xc70 net/ipv4/udp.c:842 [] udp_sendmsg+0x16cf/0x1c60 net/ipv4/udp.c:1072 [] udpv6_sendmsg+0x12f2/0x24f0 net/ipv6/udp.c:1173 [] inet_sendmsg+0x202/0x4d0 net/ipv4/af_inet.c:755 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xbe/0x110 net/socket.c:648 [] ___sys_sendmsg+0x769/0x890 net/socket.c:1975 [] __sys_sendmsg+0xc5/0x160 net/socket.c:2009 [] SYSC_sendmsg net/socket.c:2020 [inline] [] SyS_sendmsg+0x2d/0x50 net/socket.c:2016 [] entry_SYSCALL_64_fastpath+0x1e/0x9a Allocated by task 5967: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc.part.0+0x62/0xf0 mm/kasan/kasan.c:616 [] kasan_kmalloc+0xb7/0xd0 mm/kasan/kasan.c:601 [] __kmalloc+0x141/0x330 mm/slub.c:3613 [] kmalloc include/linux/slab.h:481 [inline] [] kzalloc include/linux/slab.h:620 [inline] [] neigh_alloc net/core/neighbour.c:285 [inline] [] __neigh_create+0x1d6/0x1b30 net/core/neighbour.c:457 [] neigh_create include/net/neighbour.h:313 [inline] [] ipv4_neigh_lookup+0x52e/0x6e0 net/ipv4/route.c:464 [] dst_neigh_lookup include/net/dst.h:466 [inline] [] ip6_tnl_xmit2+0x27b/0x2320 net/ipv6/ip6_tunnel.c:982 [] ip4ip6_tnl_xmit net/ipv6/ip6_tunnel.c:1134 [inline] [] ip6_tnl_xmit+0xa09/0xe00 net/ipv6/ip6_tunnel.c:1212 [] __netdev_start_xmit include/linux/netdevice.h:3750 [inline] [] netdev_start_xmit include/linux/netdevice.h:3759 [inline] [] xmit_one net/core/dev.c:2781 [inline] [] dev_hard_start_xmit+0x7c1/0x11e0 net/core/dev.c:2797 [] __dev_queue_xmit+0x164b/0x1bb0 net/core/dev.c:3229 [] dev_queue_xmit+0x18/0x20 net/core/dev.c:3263 [] neigh_direct_output+0x16/0x20 net/core/neighbour.c:1369 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip_finish_output2+0x6a2/0x1280 net/ipv4/ip_output.c:213 [] ip_finish_output+0x8b2/0xc60 net/ipv4/ip_output.c:288 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip_output+0x227/0x4c0 net/ipv4/ip_output.c:362 [] dst_output include/net/dst.h:498 [inline] [] ip_local_out+0x9c/0x180 net/ipv4/ip_output.c:119 [] ip_send_skb+0x3e/0xc0 net/ipv4/ip_output.c:1453 [] udp_send_skb+0x4fd/0xc70 net/ipv4/udp.c:842 [] udp_sendmsg+0x16cf/0x1c60 net/ipv4/udp.c:1072 [] udpv6_sendmsg+0x12f2/0x24f0 net/ipv6/udp.c:1173 [] inet_sendmsg+0x202/0x4d0 net/ipv4/af_inet.c:755 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xbe/0x110 net/socket.c:648 [] ___sys_sendmsg+0x769/0x890 net/socket.c:1975 [] __sys_sendmsg+0xc5/0x160 net/socket.c:2009 [] SYSC_sendmsg net/socket.c:2020 [inline] [] SyS_sendmsg+0x2d/0x50 net/socket.c:2016 [] entry_SYSCALL_64_fastpath+0x1e/0x9a Freed by task 2144: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0xb0/0x190 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kfree+0xf4/0x310 mm/slub.c:3749 [] kvfree+0x4d/0x60 mm/util.c:323 [] xt_free_table_info+0x14b/0x1b0 net/netfilter/x_tables.c:1019 [] __do_replace+0x413/0x650 net/ipv6/netfilter/ip6_tables.c:1260 [] do_replace net/ipv6/netfilter/ip6_tables.c:1316 [inline] [] do_ip6t_set_ctl+0x2e1/0x450 net/ipv6/netfilter/ip6_tables.c:1863 [] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114 [] ipv6_setsockopt net/ipv6/ipv6_sockglue.c:909 [inline] [] ipv6_setsockopt+0x10b/0x140 net/ipv6/ipv6_sockglue.c:893 [] tcp_setsockopt net/ipv4/tcp.c:2643 [inline] [] tcp_setsockopt+0x8a/0xe0 net/ipv4/tcp.c:2637 [] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2663 [] SYSC_setsockopt net/socket.c:1780 [inline] [] SyS_setsockopt+0x159/0x240 net/socket.c:1759 [] entry_SYSCALL_64_fastpath+0x1e/0x9a The buggy address belongs to the object at ffff8800b3b7cd80 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 696 bytes inside of 1024-byte region [ffff8800b3b7cd80, ffff8800b3b7d180) The buggy address belongs to the page: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 1 PID: 2095 Comm: syz-fuzzer Not tainted 4.4.174+ #4 task: ffff8800b691c740 task.stack: ffff8800b6690000 RIP: 0010:[] [] lookup_object lib/debugobjects.c:120 [inline] RIP: 0010:[] [] debug_object_activate+0x19e/0x470 lib/debugobjects.c:408 RSP: 0018:ffff8800b6697930 EFLAGS: 00010803 RAX: 1ffffffff0285582 RBX: 0000000000000003 RCX: ffffffff82ea7280 RDX: 14541d1cf1298164 RSI: 0000000000000001 RDI: a2a0e8e7894c0b27 RBP: ffff8800b6697a20 R08: ffffffff841552c8 R09: 0000000000000092 R10: ffffffff83a350f0 R11: 0000000000000000 R12: a2a0e8e7894c0b0f R13: ffff8800b2127b30 R14: dffffc0000000000 R15: 1ffff10016cd2f2a FS: 000000c4200863e8(0000) GS:ffff8801db700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3b6d5bc000 CR3: 00000001d73e6000 CR4: 00000000001606b0 Stack: ffff8800b691d008 1ffff10016cd2f2a ffffffff82ea7280 ffffffff841552c8 0000000041b58ab3 ffffffff82c76911 ffffffff81b0c090 ffff8800b68979c0 ffff8800b7fee398 0000000000000003 0000000000000000 0000000000000000 Call Trace: [] debug_rcu_head_queue kernel/rcu/rcu.h:75 [inline] [] __call_rcu.constprop.0+0x35/0x930 kernel/rcu/tree.c:3059 [] call_rcu+0x12/0x20 kernel/rcu/tree_plugin.h:662 [] avc_node_delete+0xc0/0x100 security/selinux/avc.c:494 [] avc_reclaim_node security/selinux/avc.c:531 [inline] [] avc_alloc_node security/selinux/avc.c:559 [inline] [] avc_alloc_node+0x290/0x3c0 security/selinux/avc.c:547 [] avc_insert security/selinux/avc.c:670 [inline] [] avc_compute_av+0x182/0x610 security/selinux/avc.c:976 [] avc_has_perm_noaudit security/selinux/avc.c:1112 [inline] [] avc_has_perm+0x355/0x3a0 security/selinux/avc.c:1146 [] inode_has_perm security/selinux/hooks.c:1614 [inline] [] file_has_perm+0x2bc/0x460 security/selinux/hooks.c:1692 [] selinux_revalidate_file_permission security/selinux/hooks.c:3192 [inline] [] selinux_file_permission+0x2ed/0x450 security/selinux/hooks.c:3212 [] security_file_permission+0x85/0x1e0 security/security.c:734 [] rw_verify_area+0xe1/0x2f0 fs/read_write.c:406 [] vfs_write+0x102/0x4e0 fs/read_write.c:536 [] SYSC_write fs/read_write.c:587 [inline] [] SyS_write+0xdc/0x1c0 fs/read_write.c:579 [] entry_SYSCALL_64_fastpath+0x1e/0x9a Code: 48 c1 e8 03 42 80 3c 30 00 0f 85 44 02 00 00 4d 8b 24 24 4d 85 e4 0f 84 b5 00 00 00 49 8d 7c 24 18 83 c3 01 48 89 fa 48 c1 ea 03 <42> 80 3c 32 00 0f 85 f5 01 00 00 4d 3b 6c 24 18 75 c0 4d 8d 74 RIP [] lookup_object lib/debugobjects.c:120 [inline] RIP [] debug_object_activate+0x19e/0x470 lib/debugobjects.c:408 RSP ---[ end trace 0849dbf05f2e465c ]---