================================================================== BUG: KASAN: slab-out-of-bounds in ext4_write_inline_data fs/ext4/inline.c:246 [inline] BUG: KASAN: slab-out-of-bounds in ext4_write_inline_data_end+0x500/0x8c0 fs/ext4/inline.c:768 Write of size 70 at addr ffff8881946bb016 by task syz-executor.4/20371 CPU: 0 PID: 20371 Comm: syz-executor.4 Not tainted 5.4.116-syzkaller-00004-g6ae6a79ecc03 #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:384 __kasan_report+0x182/0x260 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:641 check_memory_region_inline mm/kasan/generic.c:141 [inline] check_memory_region+0x2a5/0x2e0 mm/kasan/generic.c:191 memcpy+0x38/0x50 mm/kasan/common.c:124 ext4_write_inline_data fs/ext4/inline.c:246 [inline] ext4_write_inline_data_end+0x500/0x8c0 fs/ext4/inline.c:768 ext4_write_end+0x1d5/0xe50 fs/ext4/inode.c:1446 generic_perform_write+0x403/0x5a0 mm/filemap.c:3303 __generic_file_write_iter+0x239/0x480 mm/filemap.c:3421 ext4_file_write_iter+0x49e/0x10e0 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1971 [inline] new_sync_write fs/read_write.c:483 [inline] __vfs_write+0x5ec/0x780 fs/read_write.c:496 vfs_write+0x212/0x4e0 fs/read_write.c:558 ksys_write+0x186/0x2b0 fs/read_write.c:611 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4665f9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7bbb993188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 00000000004665f9 RDX: 0000000000000082 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000004bfce1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008 R13: 00007ffd3866256f R14: 00007f7bbb993300 R15: 0000000000022000 Allocated by task 19766: 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 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2821 [inline] slab_alloc mm/slub.c:2829 [inline] __kmalloc_track_caller+0x13a/0x2e0 mm/slub.c:4439 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0xaf/0x4d0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1057 [inline] nlmsg_new include/net/netlink.h:888 [inline] rtmsg_ifinfo_build_skb+0x81/0x180 net/core/rtnetlink.c:3500 rtmsg_ifinfo_event net/core/rtnetlink.c:3536 [inline] rtmsg_ifinfo+0x73/0x120 net/core/rtnetlink.c:3545 __dev_notify_flags+0xe0/0x4f0 net/core/dev.c:7922 rtnl_configure_link+0x216/0x320 net/core/rtnetlink.c:2914 veth_newlink+0x6d2/0xaf0 drivers/net/veth.c:1309 __rtnl_newlink net/core/rtnetlink.c:3227 [inline] rtnl_newlink+0x1558/0x1ce0 net/core/rtnetlink.c:3286 rtnetlink_rcv_msg+0xb74/0xd00 net/core/rtnetlink.c:5255 netlink_rcv_skb+0x200/0x480 net/netlink/af_netlink.c:2478 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x865/0x9f0 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x9ab/0xd40 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg net/socket.c:658 [inline] __sys_sendto+0x4f1/0x6c0 net/socket.c:1953 __do_sys_sendto net/socket.c:1965 [inline] __se_sys_sendto net/socket.c:1961 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:1961 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 19766: 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 skb_free_head net/core/skbuff.c:601 [inline] pskb_expand_head+0x350/0xfa0 net/core/skbuff.c:1672 netlink_trim+0x194/0x230 net/netlink/af_netlink.c:1285 netlink_broadcast_filtered+0x6d/0x10a0 net/netlink/af_netlink.c:1490 netlink_broadcast net/netlink/af_netlink.c:1535 [inline] nlmsg_multicast include/net/netlink.h:968 [inline] nlmsg_notify+0xa2/0x140 net/netlink/af_netlink.c:2521 __dev_notify_flags+0xe0/0x4f0 net/core/dev.c:7922 rtnl_configure_link+0x216/0x320 net/core/rtnetlink.c:2914 veth_newlink+0x6d2/0xaf0 drivers/net/veth.c:1309 __rtnl_newlink net/core/rtnetlink.c:3227 [inline] rtnl_newlink+0x1558/0x1ce0 net/core/rtnetlink.c:3286 rtnetlink_rcv_msg+0xb74/0xd00 net/core/rtnetlink.c:5255 netlink_rcv_skb+0x200/0x480 net/netlink/af_netlink.c:2478 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x865/0x9f0 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x9ab/0xd40 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg net/socket.c:658 [inline] __sys_sendto+0x4f1/0x6c0 net/socket.c:1953 __do_sys_sendto net/socket.c:1965 [inline] __se_sys_sendto net/socket.c:1961 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:1961 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8881946ba000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 22 bytes to the right of 4096-byte region [ffff8881946ba000, ffff8881946bb000) The buggy address belongs to the page: page:ffffea000651ae00 refcount:1 mapcount:0 mapping:ffff8881f5c0c280 index:0xffff8881946bc000 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 ffffea0006383608 ffffea00078c3a08 ffff8881f5c0c280 raw: ffff8881946bc000 0000000000040002 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x19a/0x380 mm/page_alloc.c:2171 get_page_from_freelist+0x550/0x8b0 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x3a2/0x880 mm/page_alloc.c:4855 alloc_slab_page+0x39/0x3e0 mm/slub.c:342 allocate_slab mm/slub.c:1675 [inline] new_slab+0x97/0x460 mm/slub.c:1741 new_slab_objects mm/slub.c:2498 [inline] ___slab_alloc+0x330/0x4c0 mm/slub.c:2659 __slab_alloc mm/slub.c:2699 [inline] slab_alloc_node mm/slub.c:2784 [inline] slab_alloc mm/slub.c:2829 [inline] kmem_cache_alloc_trace+0x199/0x2b0 mm/slub.c:2846 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:690 [inline] kobject_uevent_env+0x252/0x1040 lib/kobject_uevent.c:523 rx_queue_add_kobject net/core/net-sysfs.c:939 [inline] net_rx_queue_update_kobjects+0x1ef/0x460 net/core/net-sysfs.c:961 register_queue_kobjects net/core/net-sysfs.c:1577 [inline] netdev_register_kobject+0x222/0x310 net/core/net-sysfs.c:1800 register_netdevice+0xbc7/0x1480 net/core/dev.c:9139 veth_newlink+0x80d/0xaf0 drivers/net/veth.c:1328 __rtnl_newlink net/core/rtnetlink.c:3227 [inline] rtnl_newlink+0x1558/0x1ce0 net/core/rtnetlink.c:3286 rtnetlink_rcv_msg+0xb74/0xd00 net/core/rtnetlink.c:5255 netlink_rcv_skb+0x200/0x480 net/netlink/af_netlink.c:2478 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x865/0x9f0 net/netlink/af_netlink.c:1329 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] __free_pages_ok+0xc60/0xd80 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4917 [inline] __free_pages+0x8f/0x250 mm/page_alloc.c:4923 __free_slab+0x237/0x2f0 mm/slub.c:1766 free_slab mm/slub.c:1781 [inline] discard_slab mm/slub.c:1787 [inline] __slab_free mm/slub.c:3004 [inline] do_slab_free mm/slub.c:3060 [inline] ___cache_free+0x4c1/0x4e0 mm/slub.c:3079 qlist_free_all mm/kasan/quarantine.c:167 [inline] quarantine_reduce+0x17a/0x1e0 mm/kasan/quarantine.c:260 __kasan_kmalloc+0x43/0x1e0 mm/kasan/common.c:495 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2821 [inline] slab_alloc mm/slub.c:2829 [inline] kmem_cache_alloc+0x115/0x290 mm/slub.c:2834 kmem_cache_alloc_node include/linux/slab.h:427 [inline] alloc_vmap_area+0x167/0x1b50 mm/vmalloc.c:1070 __get_vm_area_node+0x1f1/0x340 mm/vmalloc.c:2066 __vmalloc_node_range+0xf0/0x790 mm/vmalloc.c:2494 __vmalloc_node mm/vmalloc.c:2554 [inline] __vmalloc_node_flags mm/vmalloc.c:2568 [inline] vzalloc+0x70/0x80 mm/vmalloc.c:2613 alloc_counters+0x66/0x510 net/ipv6/netfilter/ip6_tables.c:816 copy_entries_to_user net/ipv4/netfilter/arp_tables.c:680 [inline] get_entries net/ipv4/netfilter/arp_tables.c:867 [inline] do_arpt_get_ctl+0x5b6/0xa10 net/ipv4/netfilter/arp_tables.c:1491 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x2ac/0x2d0 net/netfilter/nf_sockopt.c:122 ip_getsockopt+0x13c/0x230 net/ipv4/ip_sockglue.c:1576 __sys_getsockopt+0x21e/0x2a0 net/socket.c:2130 Memory state around the buggy address: ffff8881946baf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881946baf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881946bb000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881946bb080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881946bb100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================