==================================================================
BUG: KASAN: slab-use-after-free in destroy_device_list+0x195/0x200 fs/f2fs/super.c:1606
Read of size 4 at addr ffff888078a5d77c by task syz-executor.4/13355
CPU: 0 PID: 13355 Comm: syz-executor.4 Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:488
kasan_report+0xda/0x110 mm/kasan/report.c:601
destroy_device_list+0x195/0x200 fs/f2fs/super.c:1606
kill_f2fs_super+0x2c6/0x430 fs/f2fs/super.c:4932
deactivate_locked_super+0xbc/0x1a0 fs/super.c:477
mount_bdev+0x277/0x2d0 fs/super.c:1665
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fdd0387e4aa
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdd0465def8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fdd0465df80 RCX: 00007fdd0387e4aa
RDX: 0000000020000040 RSI: 0000000020000080 RDI: 00007fdd0465df40
RBP: 0000000020000040 R08: 00007fdd0465df80 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000080
R13: 00007fdd0465df40 R14: 0000000000005506 R15: 00000000200004c0
Allocated by task 13355:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:372 [inline]
__kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:389
kmalloc include/linux/slab.h:590 [inline]
kzalloc include/linux/slab.h:711 [inline]
f2fs_fill_super+0xfe/0x8e50 fs/f2fs/super.c:4397
mount_bdev+0x1df/0x2d0 fs/super.c:1663
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
Freed by task 13355:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:634
poison_slab_object mm/kasan/common.c:241 [inline]
__kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2121 [inline]
slab_free mm/slub.c:4299 [inline]
kfree+0x124/0x360 mm/slub.c:4409
f2fs_fill_super+0x270c/0x8e50 fs/f2fs/super.c:4882
mount_bdev+0x1df/0x2d0 fs/super.c:1663
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
The buggy address belongs to the object at ffff888078a5c000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 6012 bytes inside of
freed 8192-byte region [ffff888078a5c000, ffff888078a5e000)
The buggy address belongs to the physical page:
page:ffffea0001e29600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78a58
head:ffffea0001e29600 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888013042280 ffffea0002138600 0000000000000003
raw: 0000000000000000 0000000000020002 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 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 12270, tgid 12269 (syz-executor.4), ts 435489572525, free_ts 435480179137
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533
prep_new_page mm/page_alloc.c:1540 [inline]
get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311
__alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
alloc_slab_page mm/slub.c:2190 [inline]
allocate_slab mm/slub.c:2354 [inline]
new_slab+0xcc/0x3a0 mm/slub.c:2407
___slab_alloc+0x4af/0x19a0 mm/slub.c:3540
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625
__slab_alloc_node mm/slub.c:3678 [inline]
slab_alloc_node mm/slub.c:3850 [inline]
__do_kmalloc_node mm/slub.c:3980 [inline]
__kmalloc+0x3b4/0x440 mm/slub.c:3994
kmalloc include/linux/slab.h:594 [inline]
f2fs_kmalloc fs/f2fs/f2fs.h:3384 [inline]
f2fs_kzalloc fs/f2fs/f2fs.h:3403 [inline]
read_all_xattrs+0x1b9/0x5d0 fs/f2fs/xattr.c:398
__f2fs_setxattr+0x2a8/0x1b00 fs/f2fs/xattr.c:653
f2fs_setxattr+0x235/0xb40 fs/f2fs/xattr.c:815
f2fs_xattr_generic_set+0x12c/0x170 fs/f2fs/xattr.c:86
__vfs_setxattr+0x173/0x1d0 fs/xattr.c:201
__vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:235
__vfs_setxattr_locked+0x17e/0x250 fs/xattr.c:296
vfs_setxattr+0x146/0x350 fs/xattr.c:322
ovl_do_setxattr fs/overlayfs/overlayfs.h:310 [inline]
ovl_setxattr fs/overlayfs/overlayfs.h:322 [inline]
ovl_verify_set_fh fs/overlayfs/namei.c:519 [inline]
ovl_verify_set_fh+0x198/0x230 fs/overlayfs/namei.c:511
page last free pid 4503 tgid 4503 stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1140 [inline]
free_unref_page_prepare+0x51f/0xb10 mm/page_alloc.c:2346
free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486
__put_partials+0x14c/0x160 mm/slub.c:2922
qlink_free mm/kasan/quarantine.c:160 [inline]
qlist_free_all+0x58/0x150 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:324
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3813 [inline]
slab_alloc_node mm/slub.c:3860 [inline]
kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3903
__alloc_skb+0x287/0x330 net/core/skbuff.c:641
alloc_skb include/linux/skbuff.h:1296 [inline]
alloc_skb_with_frags+0xe4/0x710 net/core/skbuff.c:6394
sock_alloc_send_pskb+0x7e4/0x970 net/core/sock.c:2783
unix_dgram_sendmsg+0x464/0x1ca0 net/unix/af_unix.c:1974
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0xd5/0x180 net/socket.c:745
__sys_sendto+0x225/0x310 net/socket.c:2191
__do_sys_sendto net/socket.c:2203 [inline]
__se_sys_sendto net/socket.c:2199 [inline]
__x64_sys_sendto+0xe0/0x1b0 net/socket.c:2199
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
Memory state around the buggy address:
ffff888078a5d600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888078a5d680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888078a5d700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888078a5d780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888078a5d800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in destroy_device_list+0x1f1/0x200 fs/f2fs/super.c:1613
Read of size 8 at addr ffff888078a5d780 by task syz-executor.4/13355
CPU: 0 PID: 13355 Comm: syz-executor.4 Tainted: G B 6.7.0-syzkaller-09928-g052d534373b7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:488
kasan_report+0xda/0x110 mm/kasan/report.c:601
destroy_device_list+0x1f1/0x200 fs/f2fs/super.c:1613
kill_f2fs_super+0x2c6/0x430 fs/f2fs/super.c:4932
deactivate_locked_super+0xbc/0x1a0 fs/super.c:477
mount_bdev+0x277/0x2d0 fs/super.c:1665
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fdd0387e4aa
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdd0465def8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fdd0465df80 RCX: 00007fdd0387e4aa
RDX: 0000000020000040 RSI: 0000000020000080 RDI: 00007fdd0465df40
RBP: 0000000020000040 R08: 00007fdd0465df80 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000080
R13: 00007fdd0465df40 R14: 0000000000005506 R15: 00000000200004c0
Allocated by task 13355:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:372 [inline]
__kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:389
kmalloc include/linux/slab.h:590 [inline]
kzalloc include/linux/slab.h:711 [inline]
f2fs_fill_super+0xfe/0x8e50 fs/f2fs/super.c:4397
mount_bdev+0x1df/0x2d0 fs/super.c:1663
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
Freed by task 13355:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:634
poison_slab_object mm/kasan/common.c:241 [inline]
__kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2121 [inline]
slab_free mm/slub.c:4299 [inline]
kfree+0x124/0x360 mm/slub.c:4409
f2fs_fill_super+0x270c/0x8e50 fs/f2fs/super.c:4882
mount_bdev+0x1df/0x2d0 fs/super.c:1663
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
The buggy address belongs to the object at ffff888078a5c000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 6016 bytes inside of
freed 8192-byte region [ffff888078a5c000, ffff888078a5e000)
The buggy address belongs to the physical page:
page:ffffea0001e29600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78a58
head:ffffea0001e29600 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888013042280 ffffea0002138600 0000000000000003
raw: 0000000000000000 0000000000020002 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 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 12270, tgid 12269 (syz-executor.4), ts 435489572525, free_ts 435480179137
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533
prep_new_page mm/page_alloc.c:1540 [inline]
get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311
__alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
alloc_slab_page mm/slub.c:2190 [inline]
allocate_slab mm/slub.c:2354 [inline]
new_slab+0xcc/0x3a0 mm/slub.c:2407
___slab_alloc+0x4af/0x19a0 mm/slub.c:3540
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625
__slab_alloc_node mm/slub.c:3678 [inline]
slab_alloc_node mm/slub.c:3850 [inline]
__do_kmalloc_node mm/slub.c:3980 [inline]
__kmalloc+0x3b4/0x440 mm/slub.c:3994
kmalloc include/linux/slab.h:594 [inline]
f2fs_kmalloc fs/f2fs/f2fs.h:3384 [inline]
f2fs_kzalloc fs/f2fs/f2fs.h:3403 [inline]
read_all_xattrs+0x1b9/0x5d0 fs/f2fs/xattr.c:398
__f2fs_setxattr+0x2a8/0x1b00 fs/f2fs/xattr.c:653
f2fs_setxattr+0x235/0xb40 fs/f2fs/xattr.c:815
f2fs_xattr_generic_set+0x12c/0x170 fs/f2fs/xattr.c:86
__vfs_setxattr+0x173/0x1d0 fs/xattr.c:201
__vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:235
__vfs_setxattr_locked+0x17e/0x250 fs/xattr.c:296
vfs_setxattr+0x146/0x350 fs/xattr.c:322
ovl_do_setxattr fs/overlayfs/overlayfs.h:310 [inline]
ovl_setxattr fs/overlayfs/overlayfs.h:322 [inline]
ovl_verify_set_fh fs/overlayfs/namei.c:519 [inline]
ovl_verify_set_fh+0x198/0x230 fs/overlayfs/namei.c:511
page last free pid 4503 tgid 4503 stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1140 [inline]
free_unref_page_prepare+0x51f/0xb10 mm/page_alloc.c:2346
free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486
__put_partials+0x14c/0x160 mm/slub.c:2922
qlink_free mm/kasan/quarantine.c:160 [inline]
qlist_free_all+0x58/0x150 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:324
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3813 [inline]
slab_alloc_node mm/slub.c:3860 [inline]
kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3903
__alloc_skb+0x287/0x330 net/core/skbuff.c:641
alloc_skb include/linux/skbuff.h:1296 [inline]
alloc_skb_with_frags+0xe4/0x710 net/core/skbuff.c:6394
sock_alloc_send_pskb+0x7e4/0x970 net/core/sock.c:2783
unix_dgram_sendmsg+0x464/0x1ca0 net/unix/af_unix.c:1974
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0xd5/0x180 net/socket.c:745
__sys_sendto+0x225/0x310 net/socket.c:2191
__do_sys_sendto net/socket.c:2203 [inline]
__se_sys_sendto net/socket.c:2199 [inline]
__x64_sys_sendto+0xe0/0x1b0 net/socket.c:2199
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
Memory state around the buggy address:
ffff888078a5d680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888078a5d700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888078a5d780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888078a5d800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888078a5d880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: double-free in kill_f2fs_super+0x2ce/0x430 fs/f2fs/super.c:4933
Free of addr ffff888078a5c000 by task syz-executor.4/13355
CPU: 1 PID: 13355 Comm: syz-executor.4 Tainted: G B 6.7.0-syzkaller-09928-g052d534373b7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:488
kasan_report_invalid_free+0xab/0xd0 mm/kasan/report.c:563
poison_slab_object mm/kasan/common.c:233 [inline]
__kasan_slab_free+0x18f/0x1b0 mm/kasan/common.c:257
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2121 [inline]
slab_free mm/slub.c:4299 [inline]
kfree+0x124/0x360 mm/slub.c:4409
kill_f2fs_super+0x2ce/0x430 fs/f2fs/super.c:4933
deactivate_locked_super+0xbc/0x1a0 fs/super.c:477
mount_bdev+0x277/0x2d0 fs/super.c:1665
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fdd0387e4aa
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdd0465def8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fdd0465df80 RCX: 00007fdd0387e4aa
RDX: 0000000020000040 RSI: 0000000020000080 RDI: 00007fdd0465df40
RBP: 0000000020000040 R08: 00007fdd0465df80 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000080
R13: 00007fdd0465df40 R14: 0000000000005506 R15: 00000000200004c0
Allocated by task 13355:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:372 [inline]
__kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:389
kmalloc include/linux/slab.h:590 [inline]
kzalloc include/linux/slab.h:711 [inline]
f2fs_fill_super+0xfe/0x8e50 fs/f2fs/super.c:4397
mount_bdev+0x1df/0x2d0 fs/super.c:1663
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
Freed by task 13355:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:634
poison_slab_object mm/kasan/common.c:241 [inline]
__kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2121 [inline]
slab_free mm/slub.c:4299 [inline]
kfree+0x124/0x360 mm/slub.c:4409
f2fs_fill_super+0x270c/0x8e50 fs/f2fs/super.c:4882
mount_bdev+0x1df/0x2d0 fs/super.c:1663
legacy_get_tree+0x109/0x220 fs/fs_context.c:662
vfs_get_tree+0x8c/0x370 fs/super.c:1784
do_new_mount fs/namespace.c:3352 [inline]
path_mount+0x14e6/0x1f20 fs/namespace.c:3679
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount fs/namespace.c:3875 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
The buggy address belongs to the object at ffff888078a5c000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 0 bytes inside of
8192-byte region [ffff888078a5c000, ffff888078a5e000)
The buggy address belongs to the physical page:
page:ffffea0001e29600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78a58
head:ffffea0001e29600 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888013042280 ffffea0002138600 0000000000000003
raw: 0000000000000000 0000000000020002 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 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 12270, tgid 12269 (syz-executor.4), ts 435489572525, free_ts 435480179137
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533
prep_new_page mm/page_alloc.c:1540 [inline]
get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311
__alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
alloc_slab_page mm/slub.c:2190 [inline]
allocate_slab mm/slub.c:2354 [inline]
new_slab+0xcc/0x3a0 mm/slub.c:2407
___slab_alloc+0x4af/0x19a0 mm/slub.c:3540
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625
__slab_alloc_node mm/slub.c:3678 [inline]
slab_alloc_node mm/slub.c:3850 [inline]
__do_kmalloc_node mm/slub.c:3980 [inline]
__kmalloc+0x3b4/0x440 mm/slub.c:3994
kmalloc include/linux/slab.h:594 [inline]
f2fs_kmalloc fs/f2fs/f2fs.h:3384 [inline]
f2fs_kzalloc fs/f2fs/f2fs.h:3403 [inline]
read_all_xattrs+0x1b9/0x5d0 fs/f2fs/xattr.c:398
__f2fs_setxattr+0x2a8/0x1b00 fs/f2fs/xattr.c:653
f2fs_setxattr+0x235/0xb40 fs/f2fs/xattr.c:815
f2fs_xattr_generic_set+0x12c/0x170 fs/f2fs/xattr.c:86
__vfs_setxattr+0x173/0x1d0 fs/xattr.c:201
__vfs_setxattr_noperm+0x127/0x5e0 fs/xattr.c:235
__vfs_setxattr_locked+0x17e/0x250 fs/xattr.c:296
vfs_setxattr+0x146/0x350 fs/xattr.c:322
ovl_do_setxattr fs/overlayfs/overlayfs.h:310 [inline]
ovl_setxattr fs/overlayfs/overlayfs.h:322 [inline]
ovl_verify_set_fh fs/overlayfs/namei.c:519 [inline]
ovl_verify_set_fh+0x198/0x230 fs/overlayfs/namei.c:511
page last free pid 4503 tgid 4503 stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1140 [inline]
free_unref_page_prepare+0x51f/0xb10 mm/page_alloc.c:2346
free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486
__put_partials+0x14c/0x160 mm/slub.c:2922
qlink_free mm/kasan/quarantine.c:160 [inline]
qlist_free_all+0x58/0x150 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:324
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3813 [inline]
slab_alloc_node mm/slub.c:3860 [inline]
kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3903
__alloc_skb+0x287/0x330 net/core/skbuff.c:641
alloc_skb include/linux/skbuff.h:1296 [inline]
alloc_skb_with_frags+0xe4/0x710 net/core/skbuff.c:6394
sock_alloc_send_pskb+0x7e4/0x970 net/core/sock.c:2783
unix_dgram_sendmsg+0x464/0x1ca0 net/unix/af_unix.c:1974
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0xd5/0x180 net/socket.c:745
__sys_sendto+0x225/0x310 net/socket.c:2191
__do_sys_sendto net/socket.c:2203 [inline]
__se_sys_sendto net/socket.c:2199 [inline]
__x64_sys_sendto+0xe0/0x1b0 net/socket.c:2199
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
Memory state around the buggy address:
ffff888078a5bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888078a5bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888078a5c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888078a5c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888078a5c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================