KASAN: use-after-free Read in xfs_buf_rele

12 views
Skip to first unread message

syzbot

unread,
Dec 14, 2022, 4:15:46 PM12/14/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13b96393880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=ec97370b548269aab5ab
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ec9737...@syzkaller.appspotmail.com

XFS (loop1): Unmounting Filesystem
==================================================================
BUG: KASAN: use-after-free in rht_key_hashfn include/linux/rhashtable.h:132 [inline]
BUG: KASAN: use-after-free in rht_head_hashfn include/linux/rhashtable.h:147 [inline]
BUG: KASAN: use-after-free in __rhashtable_remove_fast_one include/linux/rhashtable.h:882 [inline]
BUG: KASAN: use-after-free in __rhashtable_remove_fast include/linux/rhashtable.h:962 [inline]
BUG: KASAN: use-after-free in rhashtable_remove_fast include/linux/rhashtable.h:991 [inline]
BUG: KASAN: use-after-free in xfs_buf_rele+0x147b/0x1540 fs/xfs/xfs_buf.c:1086
Read of size 4 at addr ffff88809d20accc by task syz-executor.0/11302

CPU: 0 PID: 11302 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
kasan_report mm/kasan/report.c:412 [inline]
__asan_report_load4_noabort+0x88/0x90 mm/kasan/report.c:432
rht_key_hashfn include/linux/rhashtable.h:132 [inline]
rht_head_hashfn include/linux/rhashtable.h:147 [inline]
__rhashtable_remove_fast_one include/linux/rhashtable.h:882 [inline]
__rhashtable_remove_fast include/linux/rhashtable.h:962 [inline]
rhashtable_remove_fast include/linux/rhashtable.h:991 [inline]
xfs_buf_rele+0x147b/0x1540 fs/xfs/xfs_buf.c:1086
xfs_buftarg_shrink_scan+0x1bc/0x2c0 fs/xfs/xfs_buf.c:1753
do_shrink_slab+0x397/0xa40 mm/vmscan.c:537
shrink_slab+0x16f/0x550 mm/vmscan.c:693
drop_slab_node+0x33/0x70 mm/vmscan.c:724
drop_slab+0x4b/0x90 mm/vmscan.c:734
drop_caches_sysctl_handler+0xf6/0x110 fs/drop_caches.c:65
proc_sys_call_handler.isra.0+0x1f3/0x3b0 fs/proc/proc_sysctl.c:597
__vfs_write+0xf7/0x770 fs/read_write.c:485
__kernel_write+0x109/0x370 fs/read_write.c:506
write_pipe_buf+0x153/0x1f0 fs/splice.c:798
splice_from_pipe_feed fs/splice.c:503 [inline]
__splice_from_pipe+0x389/0x800 fs/splice.c:627
splice_from_pipe fs/splice.c:662 [inline]
default_file_splice_write+0xd8/0x180 fs/splice.c:810
do_splice_from fs/splice.c:852 [inline]
direct_splice_actor+0x115/0x160 fs/splice.c:1025
splice_direct_to_actor+0x33f/0x8d0 fs/splice.c:980
do_splice_direct+0x1a7/0x270 fs/splice.c:1068
do_sendfile+0x550/0xc30 fs/read_write.c:1447
__do_sys_sendfile64 fs/read_write.c:1502 [inline]
__se_sys_sendfile64+0xc4/0x160 fs/read_write.c:1494
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f6b6c50d0d9
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:00007f6b6aa7f168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f6b6c62cf80 RCX: 00007f6b6c50d0d9
RDX: 0000000020002080 RSI: 0000000000000004 RDI: 0000000000000005
RBP: 00007f6b6c568ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000870 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc16859e8f R14: 00007f6b6aa7f300 R15: 0000000000022000

Allocated by task 11242:
__do_kmalloc_node mm/slab.c:3689 [inline]
__kmalloc_node+0x4c/0x70 mm/slab.c:3696
kmalloc_node include/linux/slab.h:557 [inline]
kvmalloc_node+0x61/0xf0 mm/util.c:423
kvmalloc include/linux/mm.h:577 [inline]
kvzalloc include/linux/mm.h:585 [inline]
bucket_table_alloc+0x3a/0x440 lib/rhashtable.c:176
rhashtable_init+0x3bc/0x810 lib/rhashtable.c:1069
xfs_initialize_perag+0x1a9/0x4e0 fs/xfs/xfs_mount.c:207
xfs_mountfs+0xbfa/0x1bf0 fs/xfs/xfs_mount.c:862
xfs_fs_fill_super+0xd0e/0x1540 fs/xfs/xfs_super.c:1720
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 8145:
__cache_free mm/slab.c:3503 [inline]
kfree+0xcc/0x210 mm/slab.c:3822
kvfree+0x59/0x60 mm/util.c:452
rhashtable_free_and_destroy+0x15e/0x970 lib/rhashtable.c:1167
xfs_free_perag+0xab/0x120 fs/xfs/xfs_mount.c:152
xfs_unmountfs+0x1d0/0x2b0 fs/xfs/xfs_mount.c:1180
xfs_fs_put_super+0x62/0x130 fs/xfs/xfs_super.c:1774
generic_shutdown_super+0x144/0x370 fs/super.c:456
kill_block_super+0x97/0xf0 fs/super.c:1185
deactivate_locked_super+0x94/0x160 fs/super.c:329
deactivate_super+0x174/0x1a0 fs/super.c:360
cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098
task_work_run+0x148/0x1c0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:193 [inline]
exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff88809d20acc0
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 12 bytes inside of
512-byte region [ffff88809d20acc0, ffff88809d20aec0)
The buggy address belongs to the page:
page:ffffea0002748280 count:1 mapcount:0 mapping:ffff88813bff0940 index:0x0
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea000294f908 ffffea00025a1b48 ffff88813bff0940
raw: 0000000000000000 ffff88809d20a040 0000000100000006 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff88809d20ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88809d20ac00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff88809d20ac80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
^
ffff88809d20ad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88809d20ad80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Dec 20, 2022, 4:52:29 AM12/20/22
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16dc099d880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=ec97370b548269aab5ab
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=127d0677880000
mounted in repro: https://storage.googleapis.com/syzbot-assets/6a782fff0a44/mount_6.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ec9737...@syzkaller.appspotmail.com

XFS (loop4): Mounting V4 Filesystem
XFS (loop4): Ending clean mount
XFS (loop4): Unmounting Filesystem
XFS (loop0): Mounting V4 Filesystem
==================================================================
BUG: KASAN: use-after-free in rht_key_hashfn include/linux/rhashtable.h:132 [inline]
BUG: KASAN: use-after-free in rht_head_hashfn include/linux/rhashtable.h:147 [inline]
BUG: KASAN: use-after-free in __rhashtable_remove_fast_one include/linux/rhashtable.h:882 [inline]
BUG: KASAN: use-after-free in __rhashtable_remove_fast include/linux/rhashtable.h:962 [inline]
BUG: KASAN: use-after-free in rhashtable_remove_fast include/linux/rhashtable.h:991 [inline]
BUG: KASAN: use-after-free in xfs_buf_rele+0x147b/0x1540 fs/xfs/xfs_buf.c:1086
Read of size 4 at addr ffff88809029f7cc by task syz-executor.2/2134

CPU: 1 PID: 2134 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0
syz-executor.5 (2144): drop_caches: 2
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
syz-executor.5 (2144): drop_caches: 2
RIP: 0033:0x7fbd02d630d9
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:00007fbd020d5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fbd02e82f80 RCX: 00007fbd02d630d9
RDX: 0000000020002080 RSI: 0000000000000003 RDI: 0000000000000004
RBP: 00007fbd02dbeae9 R08: 0000000000000000 R09: 0000000000000000
XFS (loop0): Ending clean mount
R10: 0000000000000870 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff777a161f R14: 00007fbd020d5300 R15: 0000000000022000

Allocated by task 2041:
__do_kmalloc_node mm/slab.c:3689 [inline]
__kmalloc_node+0x4c/0x70 mm/slab.c:3696
kmalloc_node include/linux/slab.h:557 [inline]
kvmalloc_node+0x61/0xf0 mm/util.c:423
kvmalloc include/linux/mm.h:577 [inline]
kvzalloc include/linux/mm.h:585 [inline]
bucket_table_alloc+0x3a/0x440 lib/rhashtable.c:176
rhashtable_init+0x3bc/0x810 lib/rhashtable.c:1069
xfs_initialize_perag+0x1a9/0x4e0 fs/xfs/xfs_mount.c:207
xfs_mountfs+0xbfa/0x1bf0 fs/xfs/xfs_mount.c:862
xfs_fs_fill_super+0xd0e/0x1540 fs/xfs/xfs_super.c:1720
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 8174:
__cache_free mm/slab.c:3503 [inline]
kfree+0xcc/0x210 mm/slab.c:3822
kvfree+0x59/0x60 mm/util.c:452
rhashtable_free_and_destroy+0x15e/0x970 lib/rhashtable.c:1167
xfs_free_perag+0xab/0x120 fs/xfs/xfs_mount.c:152
xfs_unmountfs+0x1d0/0x2b0 fs/xfs/xfs_mount.c:1180
xfs_fs_put_super+0x62/0x130 fs/xfs/xfs_super.c:1774
generic_shutdown_super+0x144/0x370 fs/super.c:456
kill_block_super+0x97/0xf0 fs/super.c:1185
deactivate_locked_super+0x94/0x160 fs/super.c:329
deactivate_super+0x174/0x1a0 fs/super.c:360
cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098
task_work_run+0x148/0x1c0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:193 [inline]
exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff88809029f7c0
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 12 bytes inside of
512-byte region [ffff88809029f7c0, ffff88809029f9c0)
The buggy address belongs to the page:
page:ffffea000240a7c0 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff88809029f540
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea000248fdc8 ffffea0002a839c8 ffff88813bff0940
raw: ffff88809029f540 ffff88809029f040 0000000100000005 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff88809029f680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88809029f700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff88809029f780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
^
ffff88809029f800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88809029f880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

syzbot

unread,
Dec 23, 2022, 8:04:32 PM12/23/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c4215ee4771b Linux 4.14.302
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=174e782f880000
kernel config: https://syzkaller.appspot.com/x/.config?x=4a9988fe055c9527
dashboard link: https://syzkaller.appspot.com/bug?extid=6d3a2fae3f160689c744
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11ec7d7f880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1710dc54480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c93ba055d204/disk-c4215ee4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bfbc929a33c1/vmlinux-c4215ee4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/444658051770/bzImage-c4215ee4.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/9db055ba0cb3/mount_6.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6d3a2f...@syzkaller.appspotmail.com

syz-executor202 (19441): drop_caches: 2
syz-executor202 (19441): drop_caches: 2
XFS (loop5): Ending clean mount
XFS (loop5): Unmounting Filesystem
==================================================================
BUG: KASAN: use-after-free in rht_key_hashfn include/linux/rhashtable.h:259 [inline]
BUG: KASAN: use-after-free in rht_head_hashfn include/linux/rhashtable.h:283 [inline]
BUG: KASAN: use-after-free in __rhashtable_remove_fast_one include/linux/rhashtable.h:1021 [inline]
BUG: KASAN: use-after-free in __rhashtable_remove_fast include/linux/rhashtable.h:1101 [inline]
BUG: KASAN: use-after-free in rhashtable_remove_fast include/linux/rhashtable.h:1130 [inline]
BUG: KASAN: use-after-free in xfs_buf_rele+0x123c/0x12a0 fs/xfs/xfs_buf.c:1063
Read of size 4 at addr ffff8880a24fc58c by task syz-executor202/19445

CPU: 1 PID: 19445 Comm: syz-executor202 Not tainted 4.14.302-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b2/0x281 lib/dump_stack.c:58
print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
kasan_report mm/kasan/report.c:409 [inline]
__asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:429
rht_key_hashfn include/linux/rhashtable.h:259 [inline]
rht_head_hashfn include/linux/rhashtable.h:283 [inline]
__rhashtable_remove_fast_one include/linux/rhashtable.h:1021 [inline]
__rhashtable_remove_fast include/linux/rhashtable.h:1101 [inline]
rhashtable_remove_fast include/linux/rhashtable.h:1130 [inline]
xfs_buf_rele+0x123c/0x12a0 fs/xfs/xfs_buf.c:1063
xfs_buftarg_shrink_scan+0x18a/0x270 fs/xfs/xfs_buf.c:1769
do_shrink_slab mm/vmscan.c:401 [inline]
shrink_slab+0x535/0xb60 mm/vmscan.c:504
drop_slab_node+0x2b/0x60 mm/vmscan.c:531
drop_slab+0x39/0x70 mm/vmscan.c:542
drop_caches_sysctl_handler+0xc9/0xe0 fs/drop_caches.c:65
proc_sys_call_handler.isra.0+0x1ba/0x340 fs/proc/proc_sysctl.c:598
__vfs_write+0xe4/0x630 fs/read_write.c:480
__kernel_write+0xf5/0x330 fs/read_write.c:501
write_pipe_buf+0x143/0x1c0 fs/splice.c:797
splice_from_pipe_feed fs/splice.c:502 [inline]
__splice_from_pipe+0x326/0x7a0 fs/splice.c:626
splice_from_pipe fs/splice.c:661 [inline]
default_file_splice_write+0xc5/0x150 fs/splice.c:809
do_splice_from fs/splice.c:851 [inline]
direct_splice_actor+0x115/0x160 fs/splice.c:1018
splice_direct_to_actor+0x27c/0x730 fs/splice.c:973
do_splice_direct+0x164/0x210 fs/splice.c:1061
do_sendfile+0x47f/0xb30 fs/read_write.c:1441
SYSC_sendfile64 fs/read_write.c:1496 [inline]
SyS_sendfile64+0x9b/0x110 fs/read_write.c:1488
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f452f165be9
RSP: 002b:00007f452f10e2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f452f1f67a0 RCX: 00007f452f165be9
RDX: 0000000020002080 RSI: 0000000000000003 RDI: 0000000000000004
RBP: 00007f452f1f67ac R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000870 R11: 0000000000000246 R12: 00007f452f1c2ff0
R13: 0031656c69662f2e R14: 7365686361635f70 R15: 00007f452f1f67a8

Allocated by task 19353:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
__do_kmalloc_node mm/slab.c:3682 [inline]
__kmalloc_node+0x4c/0x70 mm/slab.c:3689
kmalloc_node include/linux/slab.h:530 [inline]
kvmalloc_node+0x46/0xd0 mm/util.c:430
kvmalloc include/linux/mm.h:531 [inline]
kvzalloc include/linux/mm.h:539 [inline]
bucket_table_alloc+0x3a5/0x5d0 lib/rhashtable.c:217
rhashtable_init+0x3e2/0x7a0 lib/rhashtable.c:995
xfs_initialize_perag+0x174/0x3d0 fs/xfs/xfs_mount.c:218
xfs_mountfs+0xaf4/0x1f40 fs/xfs/xfs_mount.c:821
xfs_fs_fill_super+0xb7a/0x1380 fs/xfs/xfs_super.c:1688
mount_bdev+0x2b3/0x360 fs/super.c:1134
mount_fs+0x92/0x2a0 fs/super.c:1237
vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2572 [inline]
do_mount+0xe65/0x2a30 fs/namespace.c:2905
SYSC_mount fs/namespace.c:3121 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3098
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x5e/0xd3

Freed by task 7983:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
__cache_free mm/slab.c:3496 [inline]
kfree+0xc9/0x250 mm/slab.c:3815
kvfree+0x45/0x50 mm/util.c:449
rhashtable_free_and_destroy+0x20a/0x710 lib/rhashtable.c:1093
xfs_free_perag+0x9e/0xf0 fs/xfs/xfs_mount.c:164
xfs_unmountfs+0x216/0x5e0 fs/xfs/xfs_mount.c:1149
xfs_fs_put_super+0x62/0x130 fs/xfs/xfs_super.c:1742
generic_shutdown_super+0x144/0x370 fs/super.c:446
kill_block_super+0x95/0xe0 fs/super.c:1161
deactivate_locked_super+0x6c/0xd0 fs/super.c:319
deactivate_super+0x7f/0xa0 fs/super.c:350
cleanup_mnt+0x186/0x2c0 fs/namespace.c:1183
task_work_run+0x11f/0x190 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:191 [inline]
exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164
prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
entry_SYSCALL_64_after_hwframe+0x5e/0xd3

The buggy address belongs to the object at ffff8880a24fc580
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 12 bytes inside of
512-byte region [ffff8880a24fc580, ffff8880a24fc780)
The buggy address belongs to the page:
page:ffffea0002893f00 count:1 mapcount:0 mapping:ffff8880a24fc080 index:0xffff8880a24fc800
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffff8880a24fc080 ffff8880a24fc800 0000000100000004
raw: ffffea000263df20 ffffea0002887660 ffff88813fe74940 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8880a24fc480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a24fc500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880a24fc580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880a24fc600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a24fc680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages