syzbot


KASAN: global-out-of-bounds Read in pid_task

Status: auto-obsoleted due to no activity on 2024/10/14 08:08
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+9726f4debbe1e1a47e3c@syzkaller.appspotmail.com
First crash: 158d, last: 158d

Sample crash report:
gfs2: fsid=syz:syz.0:  H: s:UN f: e:0 p:0 [(ended)] 0x0
==================================================================
BUG: KASAN: global-out-of-bounds in pid_task+0x58/0x140 kernel/pid.c:414
Read of size 8 at addr ffffffff92973158 by task syz.2.127/6562

CPU: 0 PID: 6562 Comm: syz.2.127 Not tainted 6.10.0-syzkaller-00017-g5e0497553643 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 print_address_description mm/kasan/report.c:377 [inline]
 print_report+0x169/0x550 mm/kasan/report.c:488
 kasan_report+0x143/0x180 mm/kasan/report.c:601
 pid_task+0x58/0x140 kernel/pid.c:414
 dump_holder fs/gfs2/glock.c:2339 [inline]
 gfs2_dump_glock+0xfde/0x1bb0 fs/gfs2/glock.c:2450
 gfs2_consist_inode_i+0xf5/0x110 fs/gfs2/util.c:457
 gfs2_dirent_scan+0x52b/0x670
 gfs2_dir_read+0x82f/0x1af0 fs/gfs2/dir.c:1602
 gfs2_readdir+0x14e/0x1b0 fs/gfs2/file.c:116
 iterate_dir+0x57a/0x810 fs/readdir.c:110
 __do_sys_getdents fs/readdir.c:326 [inline]
 __se_sys_getdents+0x1ef/0x4d0 fs/readdir.c:311
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f61adf75bd9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f61aed67048 EFLAGS: 00000246 ORIG_RAX: 000000000000004e
RAX: ffffffffffffffda RBX: 00007f61ae1041e8 RCX: 00007f61adf75bd9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
RBP: 00007f61adfe4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f61ae1041e8 R15: 00007ffe38088a98
 </TASK>

The buggy address belongs to the variable:
 use_cid_lock+0x18/0x20

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12973
flags: 0xfff00000002000(reserved|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000002000 ffffea00004a5cc8 ffffea00004a5cc8 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)

Memory state around the buggy address:
 ffffffff92973000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffff92973080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffff92973100: 00 00 f9 f9 00 00 00 00 04 f9 f9 f9 00 f9 f9 f9
                                                    ^
 ffffffff92973180: 00 00 f9 f9 04 f9 f9 f9 00 00 00 00 00 00 f9 f9
 ffffffff92973200: 00 00 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/16 08:07 upstream 5e0497553643 e8709b21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: global-out-of-bounds Read in pid_task
* Struck through repros no longer work on HEAD.