================================================================== BUG: KASAN: slab-out-of-bounds in cleancache_fs_enabled_mapping include/linux/cleancache.h:56 [inline] BUG: KASAN: slab-out-of-bounds in cleancache_invalidate_page include/linux/cleancache.h:110 [inline] BUG: KASAN: slab-out-of-bounds in unaccount_page_cache_page+0x99f/0xa80 mm/filemap.c:175 Read of size 4 at addr ffff888111c6f470 by task syz-executor.0/17715 CPU: 1 PID: 17715 Comm: syz-executor.0 Tainted: G W 5.10.178-syzkaller-00127-g43c801dc3325 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 cleancache_fs_enabled_mapping include/linux/cleancache.h:56 [inline] cleancache_invalidate_page include/linux/cleancache.h:110 [inline] unaccount_page_cache_page+0x99f/0xa80 mm/filemap.c:175 __delete_from_page_cache+0xd0/0x5d0 mm/filemap.c:243 __remove_mapping+0x567/0x690 mm/vmscan.c:978 shrink_page_list+0x1f38/0x4c60 mm/vmscan.c:1491 shrink_inactive_list+0x591/0x1150 mm/vmscan.c:2048 shrink_list mm/vmscan.c:2267 [inline] shrink_lruvec+0xced/0x3820 mm/vmscan.c:5435 shrink_node_memcgs mm/vmscan.c:5622 [inline] shrink_node+0xdf3/0x1fb0 mm/vmscan.c:5652 shrink_zones mm/vmscan.c:5855 [inline] do_try_to_free_pages+0x67e/0x15e0 mm/vmscan.c:5913 try_to_free_mem_cgroup_pages+0x369/0x830 mm/vmscan.c:6231 memory_max_write+0x265/0x470 mm/memcontrol.c:6437 cgroup_file_write+0x290/0x590 kernel/cgroup/cgroup.c:3835 kernfs_fop_write_iter+0x2c4/0x410 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:1976 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xb55/0xe70 fs/read_write.c:605 ksys_write+0x199/0x2c0 fs/read_write.c:658 __do_sys_write fs/read_write.c:670 [inline] __se_sys_write fs/read_write.c:667 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:667 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f8a19821169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007f8a18552168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f8a19941120 RCX: 00007f8a19821169 RDX: 0000000000000012 RSI: 0000000020000140 RDI: 000000000000000b RBP: 00007f8a1987cca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffaa56280f R14: 00007f8a18552300 R15: 0000000000022000 Allocated by task 12573: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] ____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:509 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] kmem_cache_alloc_trace+0x18a/0x2e0 mm/slub.c:2974 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] snmp6_alloc_dev net/ipv6/addrconf.c:353 [inline] ipv6_add_dev+0x579/0x10b0 net/ipv6/addrconf.c:402 addrconf_notify+0x58e/0xe90 net/ipv6/addrconf.c:3540 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:410 call_netdevice_notifiers_info net/core/dev.c:2054 [inline] call_netdevice_notifiers_extack net/core/dev.c:2066 [inline] call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2080 register_netdevice+0x1066/0x13f0 net/core/dev.c:10055 veth_newlink+0x670/0xb70 drivers/net/veth.c:1361 __rtnl_newlink net/core/rtnetlink.c:3446 [inline] rtnl_newlink+0x14bc/0x1f10 net/core/rtnetlink.c:3494 rtnetlink_rcv_msg+0x955/0xc50 net/core/rtnetlink.c:5571 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2525 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5589 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x8df/0xac0 net/netlink/af_netlink.c:1348 netlink_sendmsg+0xa46/0xd00 net/netlink/af_netlink.c:1944 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] __sys_sendto+0x545/0x700 net/socket.c:1987 __do_sys_sendto net/socket.c:1999 [inline] __se_sys_sendto net/socket.c:1995 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:1995 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 The buggy address belongs to the object at ffff888111c6e000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1136 bytes to the right of 4096-byte region [ffff888111c6e000, ffff888111c6f000) The buggy address belongs to the page: page:ffffea0004471a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111c68 head:ffffea0004471a00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042c00 raw: 0000000000000000 0000000000040004 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), pid 12573, ts 711113004032, free_ts 711109114455 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2455 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2461 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4253 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5345 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] __kmalloc_track_caller+0x1f8/0x320 mm/slub.c:4536 kmemdup+0x24/0x50 mm/util.c:131 __devinet_sysctl_register+0xac/0x2a0 net/ipv4/devinet.c:2560 devinet_sysctl_register+0x16a/0x1e0 net/ipv4/devinet.c:2612 inetdev_init+0x25f/0x460 net/ipv4/devinet.c:276 inetdev_event+0x205/0x1040 net/ipv4/devinet.c:1531 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:410 call_netdevice_notifiers_info net/core/dev.c:2054 [inline] call_netdevice_notifiers_extack net/core/dev.c:2066 [inline] call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2080 register_netdevice+0x1066/0x13f0 net/core/dev.c:10055 veth_newlink+0x670/0xb70 drivers/net/veth.c:1361 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1348 [inline] __free_pages_ok+0x82c/0x850 mm/page_alloc.c:1628 free_the_page+0x76/0x370 mm/page_alloc.c:5406 __free_pages+0x67/0xc0 mm/page_alloc.c:5415 __free_slab+0xcf/0x190 mm/slub.c:1894 free_slab mm/slub.c:1909 [inline] discard_slab mm/slub.c:1915 [inline] unfreeze_partials+0x15e/0x190 mm/slub.c:2410 put_cpu_partial+0xbf/0x180 mm/slub.c:2446 __slab_free+0x2c8/0x3a0 mm/slub.c:3095 do_slab_free mm/slub.c:3191 [inline] ___cache_free+0x111/0x130 mm/slub.c:3210 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x47/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x15a/0x170 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:440 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc_trace+0x163/0x2e0 mm/slub.c:2972 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] inetdev_init+0x83/0x460 net/ipv4/devinet.c:259 inetdev_event+0x205/0x1040 net/ipv4/devinet.c:1531 Memory state around the buggy address: ffff888111c6f300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888111c6f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888111c6f400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888111c6f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888111c6f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== syz-executor.0 invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=1000 CPU: 1 PID: 17715 Comm: syz-executor.0 Tainted: G B W 5.10.178-syzkaller-00127-g43c801dc3325 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 dump_stack+0x15/0x17 lib/dump_stack.c:135 dump_header+0xd8/0x6d0 mm/oom_kill.c:501 oom_kill_process+0xef/0x2d0 mm/oom_kill.c:1027 out_of_memory+0x9bd/0xe10 mm/oom_kill.c:1170 mem_cgroup_out_of_memory+0x2a8/0x380 mm/memcontrol.c:1733 memory_max_write+0x359/0x470 mm/memcontrol.c:6444 cgroup_file_write+0x290/0x590 kernel/cgroup/cgroup.c:3835 kernfs_fop_write_iter+0x2c4/0x410 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:1976 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xb55/0xe70 fs/read_write.c:605 ksys_write+0x199/0x2c0 fs/read_write.c:658 __do_sys_write fs/read_write.c:670 [inline] __se_sys_write fs/read_write.c:667 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:667 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f8a19821169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007f8a18552168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f8a19941120 RCX: 00007f8a19821169 RDX: 0000000000000012 RSI: 0000000020000140 RDI: 000000000000000b RBP: 00007f8a1987cca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffaa56280f R14: 00007f8a18552300 R15: 0000000000022000 memory: usage 10284kB, limit 0kB, failcnt 53 swap: usage 0kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz1: anon 135168 file 10407936 kernel_stack 0 percpu 0 sock 8192 shmem 10407936 file_mapped 270336 file_dirty 0 file_writeback 0 anon_thp 0 inactive_anon 0 active_anon 10407936 inactive_file 135168 active_file 106496 unevictable 135168 slab_reclaimable 0 slab_unreclaimable 0 slab 0 workingset_refault_anon 0 workingset_refault_file 0 workingset_activate_anon 0 workingset_activate_file 0 workingset_restore_anon 0 workingset_restore_file 0 oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz0,mems_allowed=0,oom_memcg=/syz1,task_memcg=/syz1,task=syz-executor.1,pid=14715,uid=0 Memory cgroup out of memory: Killed process 14715 (syz-executor.1) total-vm:48520kB, anon-rss:464kB, file-rss:15228kB, shmem-rss:64kB, UID:0 pgtables:88kB oom_score_adj:0