Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB ================================================================== Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB BUG: KASAN: use-after-free in l2tp_nl_tunnel_send+0xb60/0xcf0 net/l2tp/l2tp_netlink.c:339 Read of size 4 at addr ffff88809604f6a8 by task syz-executor.4/6187 CPU: 1 PID: 6187 Comm: syz-executor.4 Not tainted 4.14.173-syzkaller #0 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+0x13e/0x194 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393 l2tp_nl_tunnel_send+0xb60/0xcf0 net/l2tp/l2tp_netlink.c:339 Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB l2tp_tunnel_notify.constprop.0+0xab/0x140 net/l2tp/l2tp_netlink.c:121 4086 total pagecache pages l2tp_nl_cmd_tunnel_create+0x3d6/0x8e0 net/l2tp/l2tp_netlink.c:257 0 pages in swap cache genl_family_rcv_msg+0x57c/0xb30 net/netlink/genetlink.c:600 Swap cache stats: add 0, delete 0, find 0/0 genl_rcv_msg+0xaf/0x140 net/netlink/genetlink.c:625 netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2433 Free swap = 0kB genl_rcv+0x24/0x40 net/netlink/genetlink.c:636 Total swap = 0kB netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x620 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x733/0xbe0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xc5/0x100 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 1965979 pages RAM __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45c679 0 pages HighMem/MovableOnly RSP: 002b:00007f3d7c6e2c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f3d7c6e36d4 RCX: 000000000045c679 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000005 RBP: 000000000076bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000943 R14: 00000000004d5598 R15: 000000000076bfac 339049 pages reserved Allocated by task 6187: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x14d/0x7b0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] l2tp_tunnel_create+0x3a3/0xd10 net/l2tp/l2tp_core.c:1612 l2tp_nl_cmd_tunnel_create+0x3b6/0x8e0 net/l2tp/l2tp_netlink.c:251 genl_family_rcv_msg+0x57c/0xb30 net/netlink/genetlink.c:600 0 pages cma reserved genl_rcv_msg+0xaf/0x140 net/netlink/genetlink.c:625 Out of memory: Kill process 6144 (syz-executor.0) score 1007 or sacrifice child netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2433 genl_rcv+0x24/0x40 net/netlink/genetlink.c:636 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x620 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x733/0xbe0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xc5/0x100 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 6147: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcb/0x260 mm/slab.c:3815 __rcu_reclaim kernel/rcu/rcu.h:190 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x8a3/0x1190 kernel/rcu/tree.c:2946 __do_softirq+0x254/0x9bf kernel/softirq.c:288 The buggy address belongs to the object at ffff88809604f5c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 232 bytes inside of 512-byte region [ffff88809604f5c0, ffff88809604f7c0) The buggy address belongs to the page: page:ffffea00025813c0 count:1 mapcount:0 mapping:ffff88809604f0c0 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88809604f0c0 0000000000000000 0000000100000006 raw: ffffea00023f9da0 ffffea00022697e0 ffff88812fe56940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809604f580: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88809604f600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809604f680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809604f700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809604f780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================