================================================================== BUG: KASAN: slab-out-of-bounds in fl6_update_dst+0x2bb/0x2c0 net/ipv6/exthdrs.c:1356 Read of size 16 at addr ffff88809de6dad8 by task syz-executor.3/15375 CPU: 0 PID: 15375 Comm: syz-executor.3 Not tainted 5.7.0-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:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 fl6_update_dst+0x2bb/0x2c0 net/ipv6/exthdrs.c:1356 tcp_v6_connect+0xd5d/0x21a0 net/ipv6/tcp_ipv6.c:279 __inet_stream_connect+0x80f/0xe30 net/ipv4/af_inet.c:658 inet_stream_connect+0x53/0xa0 net/ipv4/af_inet.c:722 __sys_connect_file+0x155/0x1a0 net/socket.c:1854 __sys_connect+0x160/0x190 net/socket.c:1871 __do_sys_connect net/socket.c:1882 [inline] __se_sys_connect net/socket.c:1879 [inline] __ia32_sys_connect+0x6e/0xb0 net/socket.c:1879 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x270/0xe90 arch/x86/entry/common.c:396 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Allocated by task 15375: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc mm/kasan/common.c:494 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:467 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x161/0x7a0 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] sock_kmalloc net/core/sock.c:2255 [inline] sock_kmalloc+0xb5/0x100 net/core/sock.c:2246 ipv6_renew_options+0x274/0x940 net/ipv6/exthdrs.c:1275 do_ipv6_setsockopt.isra.0+0x2db4/0x4330 net/ipv6/ipv6_sockglue.c:471 compat_ipv6_setsockopt.part.0+0x666/0x870 net/ipv6/ipv6_sockglue.c:1032 compat_ipv6_setsockopt+0xf5/0x180 net/ipv6/ipv6_sockglue.c:924 inet_csk_compat_setsockopt+0x8d/0x100 net/ipv4/inet_connection_sock.c:1086 compat_tcp_setsockopt+0x45/0x80 net/ipv4/tcp.c:3289 compat_sock_common_setsockopt+0xaa/0x120 net/core/sock.c:3271 __compat_sys_setsockopt+0x15d/0x310 net/compat.c:402 __do_compat_sys_setsockopt net/compat.c:415 [inline] __se_compat_sys_setsockopt net/compat.c:412 [inline] __ia32_compat_sys_setsockopt+0xb9/0x150 net/compat.c:412 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x270/0xe90 arch/x86/entry/common.c:396 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 0: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 ip_dst_metrics_put include/net/ip.h:491 [inline] ip6_dst_destroy+0x20d/0x280 net/ipv6/route.c:373 dst_destroy+0x108/0x360 net/core/dst.c:120 rcu_do_batch kernel/rcu/tree.c:2396 [inline] rcu_core+0x59f/0x1370 kernel/rcu/tree.c:2623 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 The buggy address belongs to the object at ffff88809de6da80 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 88 bytes inside of 96-byte region [ffff88809de6da80, ffff88809de6dae0) The buggy address belongs to the page: page:ffffea0002779b40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000265ed48 ffffea00029d32c8 ffff8880aa000540 raw: 0000000000000000 ffff88809de6d000 0000000100000020 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809de6d980: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff88809de6da00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc >ffff88809de6da80: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc ^ ffff88809de6db00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff88809de6db80: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ==================================================================