audit: type=1804 audit(1665889459.208:2440): pid=2402 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.1" name="/root/syzkaller-testdir3034362922/syzkaller.KI2OLR/2578/file0" dev="sda1" ino=14662 res=1 ================================================================== BUG: KASAN: slab-out-of-bounds in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] BUG: KASAN: slab-out-of-bounds in dbNextAG+0x14f/0x530 fs/jfs/jfs_dmap.c:622 Read of size 4 at addr ffff8880a3d92058 by task syz-executor.3/2404 CPU: 0 PID: 2404 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 diAlloc+0x7ea/0x1440 fs/jfs/jfs_imap.c:1380 ialloc+0x8c/0x970 fs/jfs/jfs_inode.c:69 jfs_create.part.0+0x12b/0x880 fs/jfs/namei.c:105 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:0x7feb786d45a9 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:00007feb77005168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007feb787f5120 RCX: 00007feb786d45a9 RDX: 0000000000000000 RSI: 0000000000141042 RDI: 0000000020000040 RBP: 00007feb7872f580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffaa373faf R14: 00007feb77005300 R15: 0000000000022000 Allocated by task 1: __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+0xb4/0xf0 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] zstd_alloc_workspace+0x13a/0x360 fs/btrfs/zstd.c:66 btrfs_init_compress+0x264/0x3cd fs/btrfs/compression.c:846 init_btrfs_fs+0x30/0x227 fs/btrfs/super.c:2434 do_one_initcall+0xf1/0x740 init/main.c:884 do_initcall_level init/main.c:952 [inline] do_initcalls init/main.c:960 [inline] do_basic_setup init/main.c:978 [inline] kernel_init_freeable+0x9c5/0xab7 init/main.c:1145 kernel_init+0xd/0x1ba init/main.c:1062 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8880a3c00040 which belongs to the cache kmalloc-2097152 of size 2097152 The buggy address is located 1646616 bytes inside of 2097152-byte region [ffff8880a3c00040, ffff8880a3e00040) The buggy address belongs to the page: page:ffffea00028f0000 count:1 mapcount:0 mapping:ffff88813bff2c80 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff88813bff3348 ffff88813bff3348 ffff88813bff2c80 raw: 0000000000000000 ffff8880a3c00040 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a3d91f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a3d91f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a3d92000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a3d92080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a3d92100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================