attempt to access beyond end of device loop2: rw=0, want=1177632, limit=97883 attempt to access beyond end of device loop2: rw=2049, want=1177632, limit=97883 ================================================================== BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] BUG: KASAN: use-after-free in dbNextAG+0x14f/0x530 fs/jfs/jfs_dmap.c:622 Read of size 4 at addr ffff8881651f2190 by task syz-executor.3/13808 CPU: 1 PID: 13808 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/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+0x8f/0xa0 mm/kasan/report.c:412 atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] dbNextAG+0x14f/0x530 fs/jfs/jfs_dmap.c:622 dbAlloc+0x44b/0xb00 fs/jfs/jfs_dmap.c:857 dtSplitUp+0x365/0x4e70 fs/jfs/jfs_dtree.c:987 dtInsert+0x7fd/0xa00 fs/jfs/jfs_dtree.c:876 jfs_create.part.0+0x3c6/0x880 fs/jfs/namei.c:150 jfs_create+0x3f/0x60 fs/jfs/namei.c:90 lookup_open+0x893/0x1a20 fs/namei.c:3235 do_last fs/namei.c:3327 [inline] path_openat+0x1094/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f2be497b5a9 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2be32ef168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f2be4a9cf80 RCX: 00007f2be497b5a9 RDX: 000000000000275a RSI: 00000000200001c0 RDI: ffffffffffffff9c RBP: 00007f2be49d6580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffecee3ff4f R14: 00007f2be32ef300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea0005947c80 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x57ff00000000000() raw: 057ff00000000000 ffffea0005947c88 ffffea0005947c88 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881651f2080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881651f2100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881651f2180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881651f2200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881651f2280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================