================================================================== BUG: KASAN: use-after-free in mqueue_get_tree+0x2ac/0x2e0 ipc/mqueue.c:362 Read of size 8 at addr ffff8801b761de88 by task syz-executor2/15785 CPU: 0 PID: 15785 Comm: syz-executor2 Not tainted 4.19.0-rc3-next-20180912+ #72 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d3/0x2c4 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 mqueue_get_tree+0x2ac/0x2e0 ipc/mqueue.c:362 vfs_get_tree+0x1cb/0x5c0 fs/super.c:1787 mq_create_mount+0xe3/0x190 ipc/mqueue.c:415 mq_init_ns+0x15a/0x210 ipc/mqueue.c:1621 create_ipc_ns ipc/namespace.c:58 [inline] copy_ipcs+0x3d2/0x580 ipc/namespace.c:84 create_new_namespaces+0x376/0x900 kernel/nsproxy.c:87 unshare_nsproxy_namespaces+0xc3/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x79c/0x10b0 kernel/fork.c:2535 __do_sys_unshare kernel/fork.c:2603 [inline] __se_sys_unshare kernel/fork.c:2601 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2601 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4572d9 Code: fd b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe47e7b7c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000110 RAX: ffffffffffffffda RBX: 00007fe47e7b86d4 RCX: 00000000004572d9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000008000000 RBP: 00000000009300a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004d7c40 R14: 00000000004caa82 R15: 0000000000000000 Allocated by task 13920: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x730 mm/slab.c:3554 skb_clone+0x1bb/0x500 net/core/skbuff.c:1280 ip_frag_reasm net/ipv4/ip_fragment.c:531 [inline] ip_frag_queue net/ipv4/ip_fragment.c:489 [inline] ip_defrag+0x1e6a/0x4800 net/ipv4/ip_fragment.c:689 nf_ct_ipv4_gather_frags net/ipv4/netfilter/nf_defrag_ipv4.c:34 [inline] ipv4_conntrack_defrag+0x40e/0x580 net/ipv4/netfilter/nf_defrag_ipv4.c:89 nf_hook_entry_hookfn include/linux/netfilter.h:119 [inline] nf_hook_slow+0xc2/0x1c0 net/netfilter/core.c:511 nf_hook include/linux/netfilter.h:242 [inline] NF_HOOK include/linux/netfilter.h:285 [inline] ip_rcv+0x392/0x610 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4894 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5004 process_backlog+0x217/0x760 net/core/dev.c:5808 napi_poll net/core/dev.c:6228 [inline] net_rx_action+0x7c5/0x1950 net/core/dev.c:6294 __do_softirq+0x30b/0xb03 kernel/softirq.c:292 Freed by task 9: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3756 kfree_skbmem+0x154/0x230 net/core/skbuff.c:582 __kfree_skb net/core/skbuff.c:642 [inline] kfree_skb+0x1c3/0x580 net/core/skbuff.c:659 kfree_skb_list net/core/skbuff.c:668 [inline] skb_release_data+0x4af/0x880 net/core/skbuff.c:567 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] kfree_skb+0x1bb/0x580 net/core/skbuff.c:659 kfree_skb_list net/core/skbuff.c:668 [inline] skb_release_data+0x4af/0x880 net/core/skbuff.c:567 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] kfree_skb+0x1bb/0x580 net/core/skbuff.c:659 ip_rcv_finish_core.isra.16+0xd1d/0x1f40 net/ipv4/ip_input.c:393 ip_rcv_finish+0xc6/0x300 net/ipv4/ip_input.c:413 NF_HOOK include/linux/netfilter.h:287 [inline] ip_rcv+0xed/0x610 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4894 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5004 netif_receive_skb_internal+0x12c/0x620 net/core/dev.c:5107 napi_skb_finish net/core/dev.c:5564 [inline] napi_gro_receive+0x450/0x5f0 net/core/dev.c:5595 gro_cell_poll+0x132/0x210 net/core/gro_cells.c:46 napi_poll net/core/dev.c:6228 [inline] net_rx_action+0x7c5/0x1950 net/core/dev.c:6294 __do_softirq+0x30b/0xb03 kernel/softirq.c:292 The buggy address belongs to the object at ffff8801b761de80 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 8 bytes inside of 232-byte region [ffff8801b761de80, ffff8801b761df68) The buggy address belongs to the page: page:ffffea0006dd8740 count:1 mapcount:0 mapping:ffff8801d9a04040 index:0xffff8801b761d5c0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea00075efc48 ffffea0007209e88 ffff8801d9a04040 raw: ffff8801b761d5c0 ffff8801b761d0c0 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801b761dd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801b761de00: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc >ffff8801b761de80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801b761df00: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ffff8801b761df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================