================================================================== BUG: KASAN: use-after-free in ip_icmp_error+0x4e1/0x5a0 net/ipv4/ip_sockglue.c:405 Read of size 1 at addr ffff8880948ae000 by task ksoftirqd/0/9 CPU: 0 PID: 9 Comm: ksoftirqd/0 Not tainted 5.7.0-rc6-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:382 __kasan_report.cold+0x20/0x38 mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 ip_icmp_error+0x4e1/0x5a0 net/ipv4/ip_sockglue.c:405 tcp_v4_err+0x9b2/0x1d00 net/ipv4/tcp_ipv4.c:576 icmp_socket_deliver+0x1e4/0x360 net/ipv4/icmp.c:803 icmp_unreach+0x33b/0xab0 net/ipv4/icmp.c:920 icmp_rcv+0xee6/0x15f0 net/ipv4/icmp.c:1102 ip_protocol_deliver_rcu+0x57/0x880 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x220/0x360 net/ipv4/ip_input.c:231 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_local_deliver+0x1c8/0x4e0 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:441 [inline] ip_rcv_finish+0x1da/0x2f0 net/ipv4/ip_input.c:428 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_rcv+0xd0/0x3c0 net/ipv4/ip_input.c:539 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5268 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5382 process_backlog+0x21e/0x7a0 net/core/dev.c:6214 napi_poll net/core/dev.c:6659 [inline] net_rx_action+0x4c2/0x1070 net/core/dev.c:6727 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 run_ksoftirqd kernel/softirq.c:604 [inline] run_ksoftirqd+0x89/0x100 kernel/softirq.c:596 smpboot_thread_fn+0x653/0x9e0 kernel/smpboot.c:165 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Allocated by task 4120: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x161/0x7a0 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] tomoyo_realpath_from_path+0xc2/0x620 security/tomoyo/realpath.c:252 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x214/0x400 security/tomoyo/file.c:822 security_inode_getattr+0xeb/0x150 security/security.c:1273 vfs_getattr+0x22/0x60 fs/stat.c:117 vfs_statx+0x142/0x1e0 fs/stat.c:201 vfs_lstat include/linux/fs.h:3284 [inline] __do_sys_newlstat+0x96/0x120 fs/stat.c:364 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 4120: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 tomoyo_realpath_from_path+0x18f/0x620 security/tomoyo/realpath.c:289 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x214/0x400 security/tomoyo/file.c:822 security_inode_getattr+0xeb/0x150 security/security.c:1273 vfs_getattr+0x22/0x60 fs/stat.c:117 vfs_statx+0x142/0x1e0 fs/stat.c:201 vfs_lstat include/linux/fs.h:3284 [inline] __do_sys_newlstat+0x96/0x120 fs/stat.c:364 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 The buggy address belongs to the object at ffff8880948ae000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 0 bytes inside of 4096-byte region [ffff8880948ae000, ffff8880948af000) The buggy address belongs to the page: page:ffffea0002522b80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 head:ffffea0002522b80 order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0002554a08 ffffea00027a4a08 ffff8880aa002000 raw: 0000000000000000 ffff8880948ae000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880948adf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880948adf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880948ae000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880948ae080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880948ae100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================