================================================================== BUG: KASAN: use-after-free in free_pipe_info+0x266/0x2a0 fs/pipe.c:678 Read of size 8 at addr ffff8801b489a910 by task udevd/5701 CPU: 0 PID: 5701 Comm: udevd Not tainted 4.16.0-rc6+ #288 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x24d lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23c/0x360 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 free_pipe_info+0x266/0x2a0 fs/pipe.c:678 put_pipe_info+0xb0/0xd0 fs/pipe.c:556 pipe_release+0x1af/0x250 fs/pipe.c:577 __fput+0x327/0x7e0 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x199/0x270 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x275/0x2f0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ec/0x940 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x7ff77994e2b0 RSP: 002b:00007ffce684f228 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 20c49ba5e353f7cf RCX: 00007ff77994e2b0 RDX: 0000000000000000 RSI: 00007ffce684f29c RDI: 0000000000000005 RBP: 00000000ffffffff R08: 0000000000000006 R09: 00000020166df354 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000017e9d30 R13: 000000000000317f R14: 00007ffce684f294 R15: 00000000017cb250 Allocated by task 4352: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552 __do_kmalloc_node mm/slab.c:3669 [inline] __kmalloc_node_track_caller+0x47/0x70 mm/slab.c:3683 __kmalloc_reserve.isra.39+0x41/0xd0 net/core/skbuff.c:137 __alloc_skb+0x13b/0x780 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:986 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1179 [inline] netlink_sendmsg+0xa86/0xe60 net/netlink/af_netlink.c:1871 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xca/0x110 net/socket.c:639 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2047 __sys_sendmsg+0xe5/0x210 net/socket.c:2081 SYSC_sendmsg net/socket.c:2092 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2088 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 4352: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3485 [inline] kfree+0xd9/0x260 mm/slab.c:3800 skb_free_head+0x74/0xb0 net/core/skbuff.c:550 skb_release_data+0x58c/0x790 net/core/skbuff.c:570 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] consume_skb+0x153/0x490 net/core/skbuff.c:701 netlink_unicast_kernel net/netlink/af_netlink.c:1308 [inline] netlink_unicast+0x4cc/0x6b0 net/netlink/af_netlink.c:1333 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xca/0x110 net/socket.c:639 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2047 __sys_sendmsg+0xe5/0x210 net/socket.c:2081 SYSC_sendmsg net/socket.c:2092 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2088 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8801b489a900 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 16 bytes inside of 1024-byte region [ffff8801b489a900, ffff8801b489ad00) The buggy address belongs to the page: page:ffffea0006d22680 count:1 mapcount:0 mapping:ffff8801b489a000 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801b489a000 0000000000000000 0000000100000007 raw: ffffea000730e6a0 ffffea0007257e20 ffff8801dac00ac0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801b489a800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801b489a880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801b489a900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801b489a980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801b489aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================