================================================================== BUG: KASAN: slab-out-of-bounds in ip_check_mc_rcu+0x2c2/0x3c0 net/ipv4/igmp.c:2726 Read of size 4 at addr ffff8881f2695498 by task syz-executor797/2521 CPU: 1 PID: 2521 Comm: syz-executor797 Not tainted 5.4.101-syzkaller #0 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+0x1d8/0x24e lib/dump_stack.c:118 print_address_description+0x9b/0x650 mm/kasan/report.c:376 __kasan_report+0x182/0x250 mm/kasan/report.c:508 kasan_report+0x30/0x60 mm/kasan/common.c:641 ip_check_mc_rcu+0x2c2/0x3c0 net/ipv4/igmp.c:2726 __mkroute_output+0x372/0x1430 net/ipv4/route.c:2357 ip_route_output_key_hash net/ipv4/route.c:2465 [inline] __ip_route_output_key include/net/route.h:126 [inline] ip_route_output_flow+0x13d/0x320 net/ipv4/route.c:2726 udp_sendmsg+0x17f6/0x2f80 net/ipv4/udp.c:1147 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg net/socket.c:658 [inline] ____sys_sendmsg+0x583/0x8c0 net/socket.c:2298 ___sys_sendmsg net/socket.c:2352 [inline] __sys_sendmmsg+0x3b3/0x730 net/socket.c:2455 __do_sys_sendmmsg net/socket.c:2484 [inline] __se_sys_sendmmsg net/socket.c:2481 [inline] __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2481 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4509b9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 18 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f81d6875318 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00000000004cf4c8 RCX: 00000000004509b9 RDX: 000000000800001d RSI: 0000000020007fc0 RDI: 0000000000000003 RBP: 00000000004cf4c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000049e4ec R13: 00007ffc0ad4850f R14: 00007f81d6875400 R15: 0000000000022000 Allocated by task 2521: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x137/0x1e0 mm/kasan/common.c:517 kmem_cache_alloc_trace+0x139/0x2b0 mm/slub.c:2848 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:690 [inline] selinux_sk_alloc_security+0x7e/0x160 security/selinux/hooks.c:5155 security_sk_alloc+0x55/0xb0 security/security.c:2069 sk_prot_alloc+0xd8/0x260 net/core/sock.c:1603 sk_alloc+0x30/0x330 net/core/sock.c:1654 inet_create+0x3c0/0xa70 net/ipv4/af_inet.c:321 __sock_create+0x393/0x730 net/socket.c:1419 sock_create net/socket.c:1470 [inline] __sys_socket+0x133/0x370 net/socket.c:1512 __do_sys_socket net/socket.c:1521 [inline] __se_sys_socket net/socket.c:1519 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1519 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 2520: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:333 [inline] __kasan_slab_free+0x18a/0x240 mm/kasan/common.c:475 slab_free_hook mm/slub.c:1454 [inline] slab_free_freelist_hook+0x7b/0x150 mm/slub.c:1492 slab_free mm/slub.c:3072 [inline] kfree+0xe0/0x660 mm/slub.c:4061 security_sk_free+0x4d/0x90 security/security.c:2074 sk_prot_free net/core/sock.c:1633 [inline] __sk_destruct+0x403/0x4b0 net/core/sock.c:1722 inet_release+0x135/0x180 net/ipv4/af_inet.c:427 __sock_release net/socket.c:591 [inline] sock_close+0xd2/0x250 net/socket.c:1269 __fput+0x27d/0x6c0 fs/file_table.c:281 task_work_run+0x186/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:163 [inline] prepare_exit_to_usermode+0x2b0/0x310 arch/x86/entry/common.c:194 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8881f2695480 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 8 bytes to the right of 16-byte region [ffff8881f2695480, ffff8881f2695490) The buggy address belongs to the page: page:ffffea0007c9a540 refcount:1 mapcount:0 mapping:ffff8881f5c03680 index:0xffff8881f2695500 flags: 0x8000000000000200(slab) raw: 8000000000000200 ffffea0007b92a40 0000001a0000001a ffff8881f5c03680 raw: ffff8881f2695500 0000000080800060 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881f2695380: fb fb fc fc fb fb fc fc 00 00 fc fc 00 00 fc fc ffff8881f2695400: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc >ffff8881f2695480: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ^ ffff8881f2695500: fb fb fc fc 00 00 fc fc fb fb fc fc fb fb fc fc ffff8881f2695580: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ==================================================================