syzbot


KASAN: stack-out-of-bounds Read in gfs2_dump_glock

Status: upstream: reported C repro on 2023/05/02 11:39
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+40ad3ff8aa43131f14c1@syzkaller.appspotmail.com
First crash: 526d, last: 5d21h
Bug presence (1)
Date Name Commit Repro Result
2023/05/30 upstream (ToT) 8b817fded42d C [report] KASAN: stack-out-of-bounds Read in gfs2_dump_glock
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: stack-out-of-bounds Read in gfs2_dump_glock gfs2 C error 250 6d02h 157d 0/28 upstream: reported C repro on 2024/05/04 22:05
upstream general protection fault in gfs2_dump_glock gfs2 C 25 594d 996d 22/28 fixed on 2023/02/24 13:50
upstream general protection fault in gfs2_dump_glock (2) gfs2 C done done 48 275d 582d 0/28 auto-obsoleted due to no activity on 2024/04/08 04:28
Fix bisection attempts (10)
Created Duration User Patch Repo Result
2024/06/01 18:10 1h37m bisect fix linux-6.1.y OK (0) job log log
2024/04/30 05:19 2h23m bisect fix linux-6.1.y OK (0) job log log
2024/03/29 15:34 3h19m bisect fix linux-6.1.y OK (0) job log log
2024/02/28 09:09 1h48m bisect fix linux-6.1.y OK (0) job log log
2024/01/20 17:09 1h57m bisect fix linux-6.1.y OK (0) job log log
2023/12/21 10:27 2h07m bisect fix linux-6.1.y OK (0) job log log
2023/11/20 20:41 1h51m bisect fix linux-6.1.y OK (0) job log log
2023/10/18 10:01 1h49m bisect fix linux-6.1.y OK (0) job log log
2023/09/13 19:49 2h42m bisect fix linux-6.1.y OK (0) job log log
2023/06/30 08:23 51m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x1537/0x1b70
Read of size 8 at addr ffffc900058afcc0 by task syz-executor269/4534

CPU: 0 PID: 4534 Comm: syz-executor269 Not tainted 6.1.30-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x15f/0x4f0 mm/kasan/report.c:395
 kasan_report+0x136/0x160 mm/kasan/report.c:495
 gfs2_dump_glock+0x1537/0x1b70
 gfs2_consist_inode_i+0xf1/0x110 fs/gfs2/util.c:465
 gfs2_dirent_scan+0x512/0x640 fs/gfs2/dir.c:602
 gfs2_dirent_search+0x30a/0x8c0 fs/gfs2/dir.c:850
 gfs2_dir_search+0xae/0x2f0 fs/gfs2/dir.c:1650
 gfs2_lookupi+0x45f/0x5e0 fs/gfs2/inode.c:323
 __gfs2_lookup+0xa0/0x270 fs/gfs2/inode.c:870
 gfs2_atomic_open+0x9a/0x220 fs/gfs2/inode.c:1274
 atomic_open fs/namei.c:3276 [inline]
 lookup_open fs/namei.c:3384 [inline]
 open_last_lookups fs/namei.c:3481 [inline]
 path_openat+0xf4e/0x2e60 fs/namei.c:3711
 do_filp_open+0x230/0x480 fs/namei.c:3741
 do_sys_openat2+0x13b/0x500 fs/open.c:1318
 do_sys_open fs/open.c:1334 [inline]
 __do_sys_open fs/open.c:1342 [inline]
 __se_sys_open fs/open.c:1338 [inline]
 __x64_sys_open+0x221/0x270 fs/open.c:1338
 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+0x63/0xcd
RIP: 0033:0x7fa45eb22179
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 15 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:00007fa456eab318 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007fa45ebb97b8 RCX: 00007fa45eb22179
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200025c0
RBP: 00007fa45ebb97b0 R08: 00007fa456eab700 R09: 0000000000000000
R10: 00007fa456eab700 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 00007ffe069d65af R14: 00007fa456eab400 R15: 0000000000022000
 </TASK>

The buggy address belongs to the virtual mapping at
 [ffffc900058a8000, ffffc900058b1000) created by:
 copy_process+0x637/0x4020 kernel/fork.c:2090

The buggy address belongs to the physical page:
page:ffffea0000a1df00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2877c
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 4526, tgid 4526 (syz-executor269), ts 780897127472, free_ts 780846560151
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533
 prep_new_page mm/page_alloc.c:2540 [inline]
 get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292
 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5559
 vm_area_alloc_pages mm/vmalloc.c:2979 [inline]
 __vmalloc_area_node mm/vmalloc.c:3047 [inline]
 __vmalloc_node_range+0x96c/0x1460 mm/vmalloc.c:3219
 alloc_thread_stack_node kernel/fork.c:311 [inline]
 dup_task_struct+0x3e5/0x6d0 kernel/fork.c:980
 copy_process+0x637/0x4020 kernel/fork.c:2090
 kernel_clone+0x222/0x920 kernel/fork.c:2679
 __do_sys_clone kernel/fork.c:2820 [inline]
 __se_sys_clone kernel/fork.c:2804 [inline]
 __x64_sys_clone+0x231/0x280 kernel/fork.c:2804
 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+0x63/0xcd
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1460 [inline]
 free_pcp_prepare mm/page_alloc.c:1510 [inline]
 free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3388
 free_unref_page_list+0x107/0x810 mm/page_alloc.c:3530
 release_pages+0x2836/0x2b40 mm/swap.c:1055
 __pagevec_release+0x80/0xf0 mm/swap.c:1075
 pagevec_release include/linux/pagevec.h:71 [inline]
 folio_batch_release include/linux/pagevec.h:135 [inline]
 truncate_inode_pages_range+0x48a/0x1340 mm/truncate.c:373
 kill_bdev block/bdev.c:76 [inline]
 blkdev_flush_mapping+0x154/0x2b0 block/bdev.c:662
 blkdev_put_whole block/bdev.c:693 [inline]
 blkdev_put+0x4c0/0x750 block/bdev.c:953
 deactivate_locked_super+0xa0/0x110 fs/super.c:332
 cleanup_mnt+0x490/0x520 fs/namespace.c:1186
 task_work_run+0x246/0x300 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Memory state around the buggy address:
 ffffc900058afb80: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00
 ffffc900058afc00: 00 f2 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00
>ffffc900058afc80: 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 00 00
                                           ^
 ffffc900058afd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc900058afd80: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00
==================================================================

Crashes (34):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/30 12:44 linux-6.1.y a343b0dd87b4 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan KASAN: stack-out-of-bounds Read in gfs2_dump_glock
2024/09/16 18:04 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: stack-out-of-bounds Read in gfs2_dump_glock
2024/09/05 07:26 linux-6.1.y 699506173494 dfbe2ed4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: stack-out-of-bounds Read in gfs2_dump_glock
2024/07/19 15:06 linux-6.1.y 9b3f9a5b12dc ee4e11c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: stack-out-of-bounds Read in gfs2_dump_glock
2023/05/02 11:39 linux-6.1.y ca48fc16c493 52d40fd2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: stack-out-of-bounds Read in gfs2_dump_glock
2024/10/03 15:58 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/25 08:30 linux-6.1.y e526b12bf916 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/18 19:05 linux-6.1.y e526b12bf916 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/13 15:39 linux-6.1.y 5f55cad62cc9 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/12 14:18 linux-6.1.y 5f55cad62cc9 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/11 20:35 linux-6.1.y 5ca5b389fddf d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/11 20:35 linux-6.1.y 5ca5b389fddf d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/10 16:02 linux-6.1.y 5ca5b389fddf 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/08 07:53 linux-6.1.y 5ca5b389fddf 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/08 07:49 linux-6.1.y 5ca5b389fddf 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/09/04 07:13 linux-6.1.y 311d8503ef9f 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/08/30 20:25 linux-6.1.y 311d8503ef9f 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/08/30 03:51 linux-6.1.y 311d8503ef9f 9bd464fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/08/26 18:09 linux-6.1.y ee5e09825b81 9aee4e0b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/08/26 12:06 linux-6.1.y ee5e09825b81 d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/08/22 19:11 linux-6.1.y ee5e09825b81 ca02180f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/08/22 02:41 linux-6.1.y ee5e09825b81 ca02180f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/08/21 09:45 linux-6.1.y ee5e09825b81 db5852f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/08/16 10:36 linux-6.1.y 117ac406ba90 e1c76ab2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/07/26 12:36 linux-6.1.y c18e82d3ee44 3f86dfed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: vmalloc-out-of-bounds Read in gfs2_dump_glock
2024/07/26 07:49 linux-6.1.y c18e82d3ee44 3f86dfed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/07/22 11:04 linux-6.1.y 9b3f9a5b12dc df655b64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/07/18 15:32 linux-6.1.y 9b3f9a5b12dc 71884c12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/07/10 22:08 linux-6.1.y 7753af06eebf 6f7fa383 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/07/08 17:52 linux-6.1.y 7753af06eebf cde64f7d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/07/07 02:00 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2024/07/07 01:58 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2023/05/03 22:52 linux-6.1.y ca48fc16c493 b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
2023/05/02 20:59 linux-6.1.y ca48fc16c493 52d40fd2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan general protection fault in gfs2_dump_glock
* Struck through repros no longer work on HEAD.