================================================================== BUG: KASAN: slab-out-of-bounds in ip6_setup_cork+0xf4a/0x1200 net/ipv6/ip6_output.c:1230 at addr ffff8801cb41c64c Write of size 4 by task syz-executor1/4387 CPU: 1 PID: 4387 Comm: syz-executor1 Not tainted 4.9.62-gf09daf1 #91 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d810f608 ffffffff81d94429 ffff8801da001c80 ffff8801cb41c648 ffff8801cb41c650 ffffed00396838c9 ffff8801cb41c64c ffff8801d810f630 ffffffff8153e3ac ffffed00396838c9 ffff8801da001c80 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:334 [inline] [] __asan_report_store4_noabort+0x2c/0x30 mm/kasan/report.c:334 binder: 4407:4408 ioctl c08c5335 209dcf74 returned -22 [] ip6_setup_cork+0xf4a/0x1200 net/ipv6/ip6_output.c:1230 [] ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 [] udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 [] inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] SYSC_sendto+0x2c8/0x340 net/socket.c:1670 [] SyS_sendto+0x40/0x50 net/socket.c:1638 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801cb41c648, in cache kmalloc-8 size: 8 Allocated: PID = 4387 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 __kmalloc+0x11d/0x310 mm/slub.c:3741 kmalloc include/linux/slab.h:495 [inline] kzalloc include/linux/slab.h:636 [inline] ip6_setup_cork+0x194/0x1200 net/ipv6/ip6_output.c:1226 ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 sock_sendmsg_nosec net/socket.c:635 [inline] sock_sendmsg+0xca/0x110 net/socket.c:645 SYSC_sendto+0x2c8/0x340 net/socket.c:1670 SyS_sendto+0x40/0x50 net/socket.c:1638 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 873 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0xf0/0x2f0 mm/slub.c:3878 kfree_const+0x31/0x40 mm/util.c:35 kobject_cleanup lib/kobject.c:651 [inline] kobject_release+0x104/0x1a0 lib/kobject.c:674 kref_sub include/linux/kref.h:73 [inline] kref_put include/linux/kref.h:98 [inline] kobject_put+0x63/0xc0 lib/kobject.c:691 netdev_run_todo+0x4b5/0x6b0 net/core/dev.c:7531 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:104 tun_detach drivers/net/tun.c:579 [inline] tun_chr_close+0x49/0x60 drivers/net/tun.c:2372 __fput+0x28c/0x6e0 fs/file_table.c:208 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x115/0x190 kernel/task_work.c:116 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0x7e7/0x2a40 kernel/exit.c:833 do_group_exit+0x108/0x320 kernel/exit.c:937 get_signal+0x4d4/0x14e0 kernel/signal.c:2315 do_signal+0x87/0x1a00 arch/x86/kernel/signal.c:807 exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:156 prepare_exit_to_usermode arch/x86/entry/common.c:190 [inline] syscall_return_slowpath+0x1a0/0x1e0 arch/x86/entry/common.c:259 entry_SYSCALL_64_fastpath+0xc4/0xc6 Memory state around the buggy address: ffff8801cb41c500: fc fc fb fc fc fb fc fc 04 fc fc fb fc fc fb fc ffff8801cb41c580: fc fb fc fc 00 fc fc fb fc fc fb fc fc fb fc fc >ffff8801cb41c600: fb fc fc fb fc fc fb fc fc 01 fc fc fb fc fc fb ^ ffff8801cb41c680: fc fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc ffff8801cb41c700: fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc fc ================================================================== ================================================================== BUG: KASAN: slab-out-of-bounds in ip6_setup_cork+0xf2c/0x1200 net/ipv6/ip6_output.c:1231 at addr ffff8801cb41c650 Write of size 2 by task syz-executor1/4387 CPU: 1 PID: 4387 Comm: syz-executor1 Tainted: G B 4.9.62-gf09daf1 #91 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d810f608 ffffffff81d94429 ffff8801da001c80 ffff8801cb41c648 ffff8801cb41c650 ffffed00396838ca ffff8801cb41c650 ffff8801d810f630 ffffffff8153e3ac ffffed00396838ca ffff8801da001c80 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:333 [inline] [] __asan_report_store2_noabort+0x2c/0x30 mm/kasan/report.c:333 [] ip6_setup_cork+0xf2c/0x1200 net/ipv6/ip6_output.c:1231 [] ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 [] udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 [] inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] SYSC_sendto+0x2c8/0x340 net/socket.c:1670 [] SyS_sendto+0x40/0x50 net/socket.c:1638 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801cb41c648, in cache kmalloc-8 size: 8 Allocated: PID = 4387 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 __kmalloc+0x11d/0x310 mm/slub.c:3741 kmalloc include/linux/slab.h:495 [inline] kzalloc include/linux/slab.h:636 [inline] ip6_setup_cork+0x194/0x1200 net/ipv6/ip6_output.c:1226 ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 sock_sendmsg_nosec net/socket.c:635 [inline] sock_sendmsg+0xca/0x110 net/socket.c:645 SYSC_sendto+0x2c8/0x340 net/socket.c:1670 SyS_sendto+0x40/0x50 net/socket.c:1638 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 873 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0xf0/0x2f0 mm/slub.c:3878 kfree_const+0x31/0x40 mm/util.c:35 kobject_cleanup lib/kobject.c:651 [inline] kobject_release+0x104/0x1a0 lib/kobject.c:674 kref_sub include/linux/kref.h:73 [inline] kref_put include/linux/kref.h:98 [inline] kobject_put+0x63/0xc0 lib/kobject.c:691 netdev_run_todo+0x4b5/0x6b0 net/core/dev.c:7531 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:104 tun_detach drivers/net/tun.c:579 [inline] tun_chr_close+0x49/0x60 drivers/net/tun.c:2372 __fput+0x28c/0x6e0 fs/file_table.c:208 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x115/0x190 kernel/task_work.c:116 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0x7e7/0x2a40 kernel/exit.c:833 do_group_exit+0x108/0x320 kernel/exit.c:937 get_signal+0x4d4/0x14e0 kernel/signal.c:2315 do_signal+0x87/0x1a00 arch/x86/kernel/signal.c:807 exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:156 prepare_exit_to_usermode arch/x86/entry/common.c:190 [inline] syscall_return_slowpath+0x1a0/0x1e0 arch/x86/entry/common.c:259 entry_SYSCALL_64_fastpath+0xc4/0xc6 Memory state around the buggy address: ffff8801cb41c500: fc fc fb fc fc fb fc fc 04 fc fc fb fc fc fb fc ffff8801cb41c580: fc fb fc fc 00 fc fc fb fc fc fb fc fc fb fc fc >ffff8801cb41c600: fb fc fc fb fc fc fb fc fc 01 fc fc fb fc fc fb ^ ffff8801cb41c680: fc fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc ffff8801cb41c700: fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc fc ================================================================== ================================================================== BUG: KASAN: slab-out-of-bounds in ip6_setup_cork+0xf40/0x1200 net/ipv6/ip6_output.c:1232 at addr ffff8801cb41c652 Write of size 2 by task syz-executor1/4387 CPU: 1 PID: 4387 Comm: syz-executor1 Tainted: G B 4.9.62-gf09daf1 #91 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d810f608 ffffffff81d94429 ffff8801da001c80 ffff8801cb41c648 ffff8801cb41c650 ffffed00396838ca ffff8801cb41c652 ffff8801d810f630 ffffffff8153e3ac ffffed00396838ca ffff8801da001c80 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:333 [inline] [] __asan_report_store2_noabort+0x2c/0x30 mm/kasan/report.c:333 [] ip6_setup_cork+0xf40/0x1200 net/ipv6/ip6_output.c:1232 [] ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 [] udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 [] inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] SYSC_sendto+0x2c8/0x340 net/socket.c:1670 [] SyS_sendto+0x40/0x50 net/socket.c:1638 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801cb41c648, in cache kmalloc-8 size: 8 Allocated: PID = 8 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 __kmalloc+0x11d/0x310 mm/slub.c:3741 kmalloc include/linux/slab.h:495 [inline] kzalloc include/linux/slab.h:636 [inline] ip6_setup_cork+0x194/0x1200 net/ipv6/ip6_output.c:1226 ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 sock_sendmsg_nosec net/socket.c:635 [inline] sock_sendmsg+0xca/0x110 net/socket.c:645 SYSC_sendto+0x2c8/0x340 net/socket.c:1670 SyS_sendto+0x40/0x50 net/socket.c:1638 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 873 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0xf0/0x2f0 mm/slub.c:3878 kfree_const+0x31/0x40 mm/util.c:35 kobject_cleanup lib/kobject.c:651 [inline] kobject_release+0x104/0x1a0 lib/kobject.c:674 kref_sub include/linux/kref.h:73 [inline] kref_put include/linux/kref.h:98 [inline] kobject_put+0x63/0xc0 lib/kobject.c:691 netdev_run_todo+0x4b5/0x6b0 net/core/dev.c:7531 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:104 tun_detach drivers/net/tun.c:579 [inline] tun_chr_close+0x49/0x60 drivers/net/tun.c:2372 __fput+0x28c/0x6e0 fs/file_table.c:208 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x115/0x190 kernel/task_work.c:116 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0x7e7/0x2a40 kernel/exit.c:833 do_group_exit+0x108/0x320 kernel/exit.c:937 get_signal+0x4d4/0x14e0 kernel/signal.c:2315 do_signal+0x87/0x1a00 arch/x86/kernel/signal.c:807 exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:156 prepare_exit_to_usermode arch/x86/entry/common.c:190 [inline] syscall_return_slowpath+0x1a0/0x1e0 arch/x86/entry/common.c:259 entry_SYSCALL_64_fastpath+0xc4/0xc6 Memory state around the buggy address: ffff8801cb41c500: fc fc fb fc fc fb fc fc 04 fc fc fb fc fc fb fc ffff8801cb41c580: fc fb fc fc 00 fc fc fb fc fc fb fc fc fb fc fc >ffff8801cb41c600: fb fc fc fb fc fc fb fc fc 01 fc fc fb fc fc fb ^ ffff8801cb41c680: fc fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc ffff8801cb41c700: fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc fc ================================================================== ================================================================== BUG: KASAN: use-after-free in ip6_setup_cork+0x1048/0x1200 net/ipv6/ip6_output.c:1234 at addr ffff8801cb41c660 Write of size 8 by task syz-executor1/4387 CPU: 1 PID: 4387 Comm: syz-executor1 Tainted: G B 4.9.62-gf09daf1 #91 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d810f608 ffffffff81d94429 ffff8801da001c80 ffff8801cb41c660 ffff8801cb41c668 ffffed00396838cc ffff8801cb41c660 ffff8801d810f630 ffffffff8153e3ac ffffed00396838cc ffff8801da001c80 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:335 [inline] [] __asan_report_store8_noabort+0x2c/0x30 mm/kasan/report.c:335 [] ip6_setup_cork+0x1048/0x1200 net/ipv6/ip6_output.c:1234 [] ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 [] udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 [] inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] SYSC_sendto+0x2c8/0x340 net/socket.c:1670 [] SyS_sendto+0x40/0x50 net/socket.c:1638 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801cb41c660, in cache kmalloc-8 size: 8 Allocated: PID = 796 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 kmem_cache_alloc_trace+0xfb/0x2a0 mm/slub.c:2742 kmalloc include/linux/slab.h:490 [inline] kzalloc include/linux/slab.h:636 [inline] selinux_key_alloc+0x4e/0x1d0 security/selinux/hooks.c:6039 security_key_alloc+0x7d/0xb0 security/security.c:1547 key_alloc+0x642/0xdc0 security/keys/key.c:312 keyring_alloc+0x55/0xb0 security/keys/keyring.c:498 install_thread_keyring_to_cred.part.2+0x94/0x100 security/keys/process_keys.c:144 install_thread_keyring_to_cred security/keys/process_keys.c:141 [inline] install_thread_keyring security/keys/process_keys.c:169 [inline] lookup_user_key+0x507/0xd10 security/keys/process_keys.c:555 SYSC_add_key security/keys/keyctl.c:117 [inline] SyS_add_key+0x16f/0x390 security/keys/keyctl.c:60 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 17867 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0xf0/0x2f0 mm/slub.c:3878 selinux_key_free+0x42/0x50 security/selinux/hooks.c:6058 security_key_free+0x48/0x80 security/security.c:1552 key_gc_unused_keys.constprop.1+0x57/0x3b0 security/keys/gc.c:143 key_garbage_collector+0x2b4/0x6b0 security/keys/gc.c:296 process_one_work+0x78f/0x15f0 kernel/workqueue.c:2090 worker_thread+0xe0/0x10d0 kernel/workqueue.c:2224 kthread+0x26d/0x300 kernel/kthread.c:211 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:433 Memory state around the buggy address: ffff8801cb41c500: fc fc fb fc fc fb fc fc 04 fc fc fb fc fc fb fc ffff8801cb41c580: fc fb fc fc 00 fc fc fb fc fc fb fc fc fb fc fc >ffff8801cb41c600: fb fc fc fb fc fc fb fc fc 01 fc fc fb fc fc fb ^ ffff8801cb41c680: fc fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc ffff8801cb41c700: fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc fc ================================================================== ================================================================== BUG: KASAN: slab-out-of-bounds in ip6_setup_cork+0x1102/0x1200 net/ipv6/ip6_output.c:1239 at addr ffff8801cb41c670 Write of size 8 by task syz-executor1/4387 CPU: 1 PID: 4387 Comm: syz-executor1 Tainted: G B 4.9.62-gf09daf1 #91 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d810f608 ffffffff81d94429 ffff8801da001c80 ffff8801cb41c660 ffff8801cb41c668 ffffed00396838ce ffff8801cb41c670 ffff8801d810f630 ffffffff8153e3ac ffffed00396838ce ffff8801da001c80 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:335 [inline] [] __asan_report_store8_noabort+0x2c/0x30 mm/kasan/report.c:335 [] ip6_setup_cork+0x1102/0x1200 net/ipv6/ip6_output.c:1239 [] ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 [] udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 [] inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] SYSC_sendto+0x2c8/0x340 net/socket.c:1670 [] SyS_sendto+0x40/0x50 net/socket.c:1638 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801cb41c660, in cache kmalloc-8 size: 8 Allocated: PID = 796 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 kmem_cache_alloc_trace+0xfb/0x2a0 mm/slub.c:2742 kmalloc include/linux/slab.h:490 [inline] kzalloc include/linux/slab.h:636 [inline] selinux_key_alloc+0x4e/0x1d0 security/selinux/hooks.c:6039 security_key_alloc+0x7d/0xb0 security/security.c:1547 key_alloc+0x642/0xdc0 security/keys/key.c:312 keyring_alloc+0x55/0xb0 security/keys/keyring.c:498 install_thread_keyring_to_cred.part.2+0x94/0x100 security/keys/process_keys.c:144 install_thread_keyring_to_cred security/keys/process_keys.c:141 [inline] install_thread_keyring security/keys/process_keys.c:169 [inline] lookup_user_key+0x507/0xd10 security/keys/process_keys.c:555 SYSC_add_key security/keys/keyctl.c:117 [inline] SyS_add_key+0x16f/0x390 security/keys/keyctl.c:60 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 17867 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0xf0/0x2f0 mm/slub.c:3878 selinux_key_free+0x42/0x50 security/selinux/hooks.c:6058 security_key_free+0x48/0x80 security/security.c:1552 key_gc_unused_keys.constprop.1+0x57/0x3b0 security/keys/gc.c:143 key_garbage_collector+0x2b4/0x6b0 security/keys/gc.c:296 process_one_work+0x78f/0x15f0 kernel/workqueue.c:2090 worker_thread+0xe0/0x10d0 kernel/workqueue.c:2224 kthread+0x26d/0x300 kernel/kthread.c:211 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:433 Memory state around the buggy address: ffff8801cb41c500: fc fc fb fc fc fb fc fc 04 fc fc fb fc fc fb fc ffff8801cb41c580: fc fb fc fc 00 fc fc fb fc fc fb fc fc fb fc fc >ffff8801cb41c600: fb fc fc fb fc fc fb fc fc 01 fc fc fb fc fc fb ^ ffff8801cb41c680: fc fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc ffff8801cb41c700: fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc fc ================================================================== ================================================================== BUG: KASAN: slab-out-of-bounds in ip6_setup_cork+0x10b6/0x1200 net/ipv6/ip6_output.c:1241 at addr ffff8801cb41c670 Read of size 8 by task syz-executor1/4387 CPU: 1 PID: 4387 Comm: syz-executor1 Tainted: G B 4.9.62-gf09daf1 #91 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d810f608 ffffffff81d94429 ffff8801da001c80 ffff8801cb41c660 ffff8801cb41c668 ffffed00396838ce ffff8801cb41c670 ffff8801d810f630 ffffffff8153e3ac ffffed00396838ce ffff8801da001c80 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:330 [inline] [] __asan_report_load8_noabort+0x29/0x30 mm/kasan/report.c:330 [] ip6_setup_cork+0x10b6/0x1200 net/ipv6/ip6_output.c:1241 [] ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 [] udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 [] inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] SYSC_sendto+0x2c8/0x340 net/socket.c:1670 [] SyS_sendto+0x40/0x50 net/socket.c:1638 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801cb41c660, in cache kmalloc-8 size: 8 Allocated: PID = 796 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 kmem_cache_alloc_trace+0xfb/0x2a0 mm/slub.c:2742 kmalloc include/linux/slab.h:490 [inline] kzalloc include/linux/slab.h:636 [inline] selinux_key_alloc+0x4e/0x1d0 security/selinux/hooks.c:6039 security_key_alloc+0x7d/0xb0 security/security.c:1547 key_alloc+0x642/0xdc0 security/keys/key.c:312 keyring_alloc+0x55/0xb0 security/keys/keyring.c:498 install_thread_keyring_to_cred.part.2+0x94/0x100 security/keys/process_keys.c:144 install_thread_keyring_to_cred security/keys/process_keys.c:141 [inline] install_thread_keyring security/keys/process_keys.c:169 [inline] lookup_user_key+0x507/0xd10 security/keys/process_keys.c:555 SYSC_add_key security/keys/keyctl.c:117 [inline] SyS_add_key+0x16f/0x390 security/keys/keyctl.c:60 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 3410083984 BUG: unable to handle kernel paging request at ffffffff87109fa8 IP: [] depot_fetch_stack+0x15/0x40 lib/stackdepot.c:194 PGD 441e067 [ 195.721448] PUD 441f063 Oops: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 4387 Comm: syz-executor1 Tainted: G B 4.9.62-gf09daf1 #91 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801cac93000 task.stack: ffff8801d8108000 RIP: 0010:[] [] depot_fetch_stack+0x15/0x40 lib/stackdepot.c:194 RSP: 0018:ffff8801d810f5d8 EFLAGS: 00010006 RAX: 00000000001f8801 RBX: ffff8801cb41c670 RCX: ffffc900009a0000 RDX: 0000000000000000 RSI: ffff8801d810f5e0 RDI: 0000000000003ff0 RBP: ffff8801d810f608 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000008 R11: 0000000000000000 R12: ffff8801cb41c660 R13: ffff8801cb41c668 R14: ffffed00396838ce R15: ffff8801cb41c670 FS: 00007ff84c28d700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffff87109fa8 CR3: 00000001cc838000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff8156572e 0000000000000000 ffff8801da001c80 0000000000000008 f4ee778ddc2b95e8 ffff8801da001c80 ffff8801d810f630 ffffffff8153e3f8 ffffed00396838ce ffff8801da001c80 0000000000000000 ffff8801d810f6b8 Call Trace: [] kasan_object_err+0x68/0x70 mm/kasan/report.c:170 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:330 [inline] [] __asan_report_load8_noabort+0x29/0x30 mm/kasan/report.c:330 [] ip6_setup_cork+0x10b6/0x1200 net/ipv6/ip6_output.c:1241 [] ip6_make_skb+0x1b8/0x440 net/ipv6/ip6_output.c:1802 [] udpv6_sendmsg+0x1b1d/0x2540 net/ipv6/udp.c:1240 [] inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] SYSC_sendto+0x2c8/0x340 net/socket.c:1670 [] SyS_sendto+0x40/0x50 net/socket.c:1638 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Code: 92 52 ff 0f 0b e8 dc b9 6f ff eb de 66 2e 0f 1f 84 00 00 00 00 00 89 f8 c1 ef 11 55 25 ff ff 1f 00 81 e7 f0 3f 00 00 48 89 e5 5d <48> 03 3c c5 a0 5f 14 86 8b 47 0c 48 83 c7 18 c7 46 10 00 00 00 RIP [] depot_fetch_stack+0x15/0x40 lib/stackdepot.c:194 RSP CR2: ffffffff87109fa8 ---[ end trace b41e394ed62bb203 ]---