================================================================== BUG: KASAN: slab-out-of-bounds in fib6_info_nh_dev include/net/nexthop.h:536 [inline] BUG: KASAN: slab-out-of-bounds in nft_fib6_info_nh_uses_dev net/ipv6/netfilter/nft_fib_ipv6.c:174 [inline] BUG: KASAN: slab-out-of-bounds in nft_fib6_eval+0x1673/0x17e0 net/ipv6/netfilter/nft_fib_ipv6.c:231 Read of size 8 at addr ffff88803103b6d0 by task syz.1.968/9150 CPU: 0 UID: 0 PID: 9150 Comm: syz.1.968 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1d0 mm/kasan/report.c:595 fib6_info_nh_dev include/net/nexthop.h:536 [inline] nft_fib6_info_nh_uses_dev net/ipv6/netfilter/nft_fib_ipv6.c:174 [inline] nft_fib6_eval+0x1673/0x17e0 net/ipv6/netfilter/nft_fib_ipv6.c:231 nft_fib_inet_eval+0x200/0x250 net/netfilter/nft_fib_inet.c:34 expr_call_ops_eval net/netfilter/nf_tables_core.c:237 [inline] nft_do_chain+0x2e5/0x1990 net/netfilter/nf_tables_core.c:285 nft_do_chain_inet+0xf3/0x400 net/netfilter/nft_chain_filter.c:162 nf_hook_entry_hookfn include/linux/netfilter.h:158 [inline] nf_hook_slow+0xbf/0x220 net/netfilter/core.c:619 nf_hook.constprop.0+0x2a6/0x750 include/linux/netfilter.h:273 NF_HOOK include/linux/netfilter.h:316 [inline] ipv6_rcv+0xa4/0x3d0 net/ipv6/ip6_input.c:351 __netif_receive_skb_one_core+0x12d/0x1e0 net/core/dev.c:6202 __netif_receive_skb+0x1f/0x120 net/core/dev.c:6315 netif_receive_skb_internal net/core/dev.c:6401 [inline] netif_receive_skb+0x13b/0x7f0 net/core/dev.c:6460 tun_rx_batched.isra.0+0x3f6/0x750 drivers/net/tun.c:1511 tun_get_user+0x1e31/0x3c20 drivers/net/tun.c:1955 tun_chr_write_iter+0xdc/0x200 drivers/net/tun.c:2001 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6ac/0x1070 fs/read_write.c:688 ksys_write+0x12a/0x250 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff36815d68e Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08 RSP: 002b:00007ff369109fb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ff36910a6c0 RCX: 00007ff36815d68e RDX: 000000000000005a RSI: 0000200000000080 RDI: 00000000000000c8 RBP: 00007ff368232d6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff368416038 R14: 00007ff368415fa0 R15: 00007ffd38b609a8 Allocated by task 8112: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kmalloc_noprof include/linux/slab.h:950 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] nexthop_alloc+0x3c/0x1f0 net/ipv4/nexthop.c:536 nexthop_create net/ipv4/nexthop.c:2918 [inline] nexthop_add net/ipv4/nexthop.c:2985 [inline] rtm_new_nexthop+0x1e8b/0x8760 net/ipv4/nexthop.c:3299 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6996 netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:787 [inline] __sock_sendmsg net/socket.c:802 [inline] ____sys_sendmsg+0x9e1/0xb70 net/socket.c:2698 ___sys_sendmsg+0x190/0x1e0 net/socket.c:2752 __sys_sendmsg+0x170/0x220 net/socket.c:2784 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88803103b600 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 8 bytes to the right of allocated 200-byte region [ffff88803103b600, ffff88803103b6c8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3103a head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b842b40 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b842b40 dead000000000100 dead000000000122 head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000 head: 00fff00000000001 ffffffffffffff81 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 22848578729, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x11a6/0x33b0 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x27c/0x2bc0 mm/page_alloc.c:5226 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab mm/slub.c:3467 [inline] new_slab+0xa6/0x6c0 mm/slub.c:3525 refill_objects+0x277/0x420 mm/slub.c:7271 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x375/0x650 mm/slub.c:4651 alloc_from_pcs mm/slub.c:4749 [inline] slab_alloc_node mm/slub.c:4883 [inline] __do_kmalloc_node mm/slub.c:5294 [inline] __kvmalloc_node_noprof+0x7da/0xa00 mm/slub.c:6832 v4l2_ctrl_new+0x4a6/0x23a0 drivers/media/v4l2-core/v4l2-ctrls-core.c:2139 v4l2_ctrl_new_std+0x1bb/0x290 drivers/media/v4l2-core/v4l2-ctrls-core.c:2293 handler_new_ref+0x82f/0xc60 drivers/media/v4l2-core/v4l2-ctrls-core.c:1874 v4l2_ctrl_add_handler drivers/media/v4l2-core/v4l2-ctrls-core.c:2443 [inline] v4l2_ctrl_add_handler+0x223/0x300 drivers/media/v4l2-core/v4l2-ctrls-core.c:2417 vivid_create_controls+0x2e2e/0x3e80 drivers/media/test-drivers/vivid/vivid-ctrls.c:2019 vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:1933 [inline] vivid_probe.cold+0x4f1e/0x921e drivers/media/test-drivers/vivid/vivid-core.c:2095 platform_probe+0x106/0x1d0 drivers/base/platform.c:1418 call_driver_probe drivers/base/dd.c:631 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:709 __driver_probe_device+0x22e/0x480 drivers/base/dd.c:871 page_owner free stack trace missing Memory state around the buggy address: ffff88803103b580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803103b600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88803103b680: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ^ ffff88803103b700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803103b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================