==================================================================
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+0x6d8/0x750 mm/filemap.c:163
Read of size 4 at addr ffff88811777a470 by task kswapd0/46
CPU: 0 PID: 46 Comm: kswapd0 Not tainted 5.15.148-syzkaller-00718-g993bed180178 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
print_address_description+0x87/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0x179/0x1c0 mm/kasan/report.c:444
__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+0x6d8/0x750 mm/filemap.c:163
__delete_from_page_cache+0xc6/0x5b0 mm/filemap.c:231
__remove_mapping+0x566/0x690 mm/vmscan.c:1201
shrink_page_list+0x2723/0x5c50 mm/vmscan.c:1798
shrink_inactive_list mm/vmscan.c:2305 [inline]
shrink_list mm/vmscan.c:2550 [inline]
shrink_lruvec+0x17ec/0x4580 mm/vmscan.c:5753
shrink_node_memcgs mm/vmscan.c:5945 [inline]
shrink_node+0x1077/0x24e0 mm/vmscan.c:5975
kswapd_shrink_node mm/vmscan.c:6722 [inline]
balance_pgdat+0x15e1/0x2f50 mm/vmscan.c:6912
kswapd+0x698/0xd60 mm/vmscan.c:7171
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
Allocated by task 766:
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:433 [inline]
____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:512
__kasan_kmalloc+0x9/0x10 mm/kasan/common.c:521
kasan_kmalloc include/linux/kasan.h:227 [inline]
__kmalloc+0x13a/0x270 mm/slub.c:4427
kmalloc include/linux/slab.h:608 [inline]
kzalloc include/linux/slab.h:733 [inline]
__register_sysctl_table+0xea/0x1240 fs/proc/proc_sysctl.c:1321
register_net_sysctl+0x21e/0x230 net/sysctl_net.c:169
__devinet_sysctl_register+0x1d3/0x2a0 net/ipv4/devinet.c:2577
devinet_sysctl_register+0x16a/0x1e0 net/ipv4/devinet.c:2617
inetdev_init+0x284/0x4b0 net/ipv4/devinet.c:276
inetdev_event+0x205/0x1040 net/ipv4/devinet.c:1530
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2025 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2037 [inline]
call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2051
register_netdevice+0x1035/0x1390 net/core/dev.c:10392
br_dev_newlink+0x27/0x110 net/bridge/br_netlink.c:1443
__rtnl_newlink net/core/rtnetlink.c:3501 [inline]
rtnl_newlink+0x1495/0x2050 net/core/rtnetlink.c:3549
rtnetlink_rcv_msg+0x951/0xc40 net/core/rtnetlink.c:5630
netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2505
rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5648
netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline]
netlink_unicast+0x8df/0xac0 net/netlink/af_netlink.c:1356
netlink_sendmsg+0xa0a/0xd20 net/netlink/af_netlink.c:1924
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
____sys_sendmsg+0x59e/0x8f0 net/socket.c:2431
___sys_sendmsg+0x252/0x2e0 net/socket.c:2485
__sys_sendmsg net/socket.c:2514 [inline]
__do_sys_sendmsg net/socket.c:2523 [inline]
__se_sys_sendmsg+0x19a/0x260 net/socket.c:2521
__x64_sys_sendmsg+0x7b/0x90 net/socket.c:2521
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
Last potentially related work creation:
kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38
__kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:348
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
kvfree_call_rcu+0xb2/0x7d0 kernel/rcu/tree.c:3596
drop_sysctl_table+0x311/0x450 fs/proc/proc_sysctl.c:1682
unregister_sysctl_table+0x7b/0x120 fs/proc/proc_sysctl.c:1720
unregister_net_sysctl_table+0x15/0x20 net/sysctl_net.c:175
__devinet_sysctl_unregister net/ipv4/devinet.c:2600 [inline]
devinet_sysctl_unregister net/ipv4/devinet.c:2628 [inline]
inetdev_destroy net/ipv4/devinet.c:324 [inline]
inetdev_event+0x76f/0x1040 net/ipv4/devinet.c:1598
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2025 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2037 [inline]
call_netdevice_notifiers net/core/dev.c:2051 [inline]
unregister_netdevice_many+0xe0a/0x17c0 net/core/dev.c:11105
sit_exit_batch_net+0x620/0x670 net/ipv6/sit.c:1952
ops_exit_list net/core/net_namespace.c:174 [inline]
cleanup_net+0x6ce/0xc00 net/core/net_namespace.c:596
process_one_work+0x6bb/0xc10 kernel/workqueue.c:2325
worker_thread+0xad5/0x12a0 kernel/workqueue.c:2472
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
Second to last potentially related work creation:
kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38
__kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:348
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
insert_work+0x56/0x320 kernel/workqueue.c:1373
__queue_work+0x92a/0xcd0 kernel/workqueue.c:1539
queue_work_on+0x105/0x170 kernel/workqueue.c:1566
queue_work include/linux/workqueue.h:510 [inline]
schedule_work include/linux/workqueue.h:571 [inline]
destroy_super_rcu+0xd1/0xe0 fs/super.c:172
rcu_do_batch+0x57a/0xc10 kernel/rcu/tree.c:2523
rcu_core+0x517/0x1020 kernel/rcu/tree.c:2763
rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2776
__do_softirq+0x26d/0x5bf kernel/softirq.c:565
The buggy address belongs to the object at ffff88811777a000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1136 bytes inside of
2048-byte region [ffff88811777a000, ffff88811777a800)
The buggy address belongs to the page:
page:ffffea00045dde00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x117778
head:ffffea00045dde00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 0000000100000001 ffff888100043200
raw: 0000000000000000 0000000000080008 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 29020, ts 599965860215, free_ts 294184625211
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2604
prep_new_page+0x1b/0x110 mm/page_alloc.c:2610
get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4484
__alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5776
allocate_slab mm/slub.c:1932 [inline]
new_slab+0x9a/0x4e0 mm/slub.c:1995
___slab_alloc+0x39e/0x830 mm/slub.c:3028
__slab_alloc+0x4a/0x90 mm/slub.c:3115
slab_alloc_node mm/slub.c:3206 [inline]
slab_alloc mm/slub.c:3248 [inline]
__kmalloc_track_caller+0x16c/0x260 mm/slub.c:4945
kmemdup+0x24/0x50 mm/util.c:132
neigh_sysctl_register+0xb0/0x530 net/core/neighbour.c:3647
addrconf_sysctl_register+0xae/0x1a0 net/ipv6/addrconf.c:7163
ipv6_add_dev+0xc84/0x1140 net/ipv6/addrconf.c:454
addrconf_notify+0x593/0xdd0 net/ipv6/addrconf.c:3582
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2025 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2037 [inline]
call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2051
register_netdevice+0x1035/0x1390 net/core/dev.c:10392
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1471 [inline]
__free_pages_ok+0x985/0xa50 mm/page_alloc.c:1771
free_the_page mm/page_alloc.c:806 [inline]
__free_pages+0xe9/0xf0 mm/page_alloc.c:5852
free_nonslab_page+0x82/0xc0 mm/slub.c:3555
kfree+0x19e/0x220 mm/slub.c:4576
skb_free_head net/core/skbuff.c:656 [inline]
skb_release_data+0x8a9/0xa80 net/core/skbuff.c:678
skb_release_all net/core/skbuff.c:743 [inline]
__kfree_skb net/core/skbuff.c:757 [inline]
kfree_skb_reason net/core/skbuff.c:778 [inline]
kfree_skb+0xba/0x360 net/core/skbuff.c:792
tsk_advance_rx_queue+0x10a/0x260 net/tipc/socket.c:281
tipc_recvmsg+0xb9a/0x13b0 net/tipc/socket.c:1988
sock_recvmsg_nosec net/socket.c:966 [inline]
sock_recvmsg+0xf6/0x110 net/socket.c:984
tipc_conn_rcv_from_sock net/tipc/topsrv.c:400 [inline]
tipc_conn_recv_work+0x2ad/0x490 net/tipc/topsrv.c:423
process_one_work+0x6bb/0xc10 kernel/workqueue.c:2325
worker_thread+0xad5/0x12a0 kernel/workqueue.c:2472
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
Memory state around the buggy address:
ffff88811777a300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88811777a380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88811777a400: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc
^
ffff88811777a480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88811777a500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
general protection fault, probably for non-canonical address 0xdffffc00000000e3: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000718-0x000000000000071f]
CPU: 1 PID: 46 Comm: kswapd0 Tainted: G B 5.15.148-syzkaller-00718-g993bed180178 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:f2fs_release_page+0x23a/0x7c0 fs/f2fs/data.c:3698
Code: 00 4c 03 23 4c 89 e0 48 c1 e8 03 42 80 3c 30 00 74 08 4c 89 e7 e8 46 6b 8b ff bb 18 07 00 00 49 03 1c 24 48 89 d8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 0f 85 3c 05 00 00 44 8b 23 bb 00 00 00 40 be
RSP: 0018:ffffc900006fee48 EFLAGS: 00010202
RAX: 00000000000000e3 RBX: 0000000000000718 RCX: ffffffff8226c6da
RDX: 0000000000000000 RSI: 0000000000000296 RDI: ffff8881853b63c8
RBP: ffffc900006fee88 R08: ffffffff8226c60c R09: fffff94000cc2741
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8881853b63c8
R13: 4000000000002005 R14: dffffc0000000000 R15: ffffea0006613a00
FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005615606c2008 CR3: 000000010bb7b000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
try_to_release_page+0x194/0x1f0 mm/filemap.c:4037
shrink_page_list+0x1fd4/0x5c50 mm/vmscan.c:1763
shrink_inactive_list mm/vmscan.c:2305 [inline]
shrink_list mm/vmscan.c:2550 [inline]
shrink_lruvec+0x17ec/0x4580 mm/vmscan.c:5753
shrink_node_memcgs mm/vmscan.c:5945 [inline]
shrink_node+0x1077/0x24e0 mm/vmscan.c:5975
kswapd_shrink_node mm/vmscan.c:6722 [inline]
balance_pgdat+0x15e1/0x2f50 mm/vmscan.c:6912
kswapd+0x698/0xd60 mm/vmscan.c:7171
kthread+0x421/0x510 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
Modules linked in:
---[ end trace a05b8a63cab1bb0a ]---
RIP: 0010:f2fs_release_page+0x23a/0x7c0 fs/f2fs/data.c:3698
Code: 00 4c 03 23 4c 89 e0 48 c1 e8 03 42 80 3c 30 00 74 08 4c 89 e7 e8 46 6b 8b ff bb 18 07 00 00 49 03 1c 24 48 89 d8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 0f 85 3c 05 00 00 44 8b 23 bb 00 00 00 40 be
RSP: 0018:ffffc900006fee48 EFLAGS: 00010202
RAX: 00000000000000e3 RBX: 0000000000000718 RCX: ffffffff8226c6da
RDX: 0000000000000000 RSI: 0000000000000296 RDI: ffff8881853b63c8
RBP: ffffc900006fee88 R08: ffffffff8226c60c R09: fffff94000cc2741
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8881853b63c8
R13: 4000000000002005 R14: dffffc0000000000 R15: ffffea0006613a00
FS: 0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000557c29b0ce38 CR3: 000000010bb75000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 00 4c 03 23 add %cl,0x23(%rbx,%rax,1)
4: 4c 89 e0 mov %r12,%rax
7: 48 c1 e8 03 shr $0x3,%rax
b: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1)
10: 74 08 je 0x1a
12: 4c 89 e7 mov %r12,%rdi
15: e8 46 6b 8b ff call 0xff8b6b60
1a: bb 18 07 00 00 mov $0x718,%ebx
1f: 49 03 1c 24 add (%r12),%rbx
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 0f b6 04 30 movzbl (%rax,%r14,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 3c 05 00 00 jne 0x573
37: 44 8b 23 mov (%rbx),%r12d
3a: bb 00 00 00 40 mov $0x40000000,%ebx
3f: be .byte 0xbe