syzbot


KASAN: slab-out-of-bounds Write in extAlloc

Status: upstream: reported C repro on 2022/09/28 07:19
Reported-by: syzbot+6837936371bae0b19893@syzkaller.appspotmail.com
First crash: 797d, last: 743d
Fix bisection: failed (error log, bisect log)
  

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in atomic_inc include/asm-generic/atomic-instrumented.h:109 [inline]
BUG: KASAN: slab-out-of-bounds in extBalloc fs/jfs/jfs_extent.c:557 [inline]
BUG: KASAN: slab-out-of-bounds in extAlloc+0xb8e/0xdb0 fs/jfs/jfs_extent.c:138
Write of size 4 at addr ffff8880b2d61a18 by task syz-executor237/8076

CPU: 0 PID: 8076 Comm: syz-executor237 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/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+0x8f/0xa0 mm/kasan/report.c:412
 atomic_inc include/asm-generic/atomic-instrumented.h:109 [inline]
 extBalloc fs/jfs/jfs_extent.c:557 [inline]
 extAlloc+0xb8e/0xdb0 fs/jfs/jfs_extent.c:138
 jfs_get_block+0x1f5/0xae0 fs/jfs/inode.c:258
 nobh_write_begin+0x446/0x1030 fs/buffer.c:2619
 jfs_write_begin+0x3e/0x1a0 fs/jfs/inode.c:323
 generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3170
 __generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295
 generic_file_write_iter+0x3f8/0x730 mm/filemap.c:3323
 call_write_iter include/linux/fs.h:1821 [inline]
 new_sync_write fs/read_write.c:474 [inline]
 __vfs_write+0x51b/0x770 fs/read_write.c:487
 vfs_write+0x1f3/0x540 fs/read_write.c:549
 ksys_write+0x12b/0x2a0 fs/read_write.c:599
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fa7ba642e39
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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff63f7c418 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa7ba642e39
RDX: 000000000208e24b RSI: 0000000020000480 RDI: 0000000000000003
RBP: 00007fa7ba6026a0 R08: 0000000000000000 R09: 00007fa7ba6026a0
R10: 00005555556912c0 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00080000000000f8 R15: 0000000000000000

Allocated by task 8076:
 kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625
 kmalloc include/linux/slab.h:515 [inline]
 dbMount+0x4d/0x880 fs/jfs/jfs_dmap.c:176
 jfs_mount+0x124/0x3d0 fs/jfs/jfs_mount.c:133
 jfs_fill_super+0x55c/0xb50 fs/jfs/super.c:589
 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 0:
(stack is not available)

The buggy address belongs to the object at ffff8880b2d61340
 which belongs to the cache kmalloc-2048 of size 2048
The buggy address is located 1752 bytes inside of
 2048-byte region [ffff8880b2d61340, ffff8880b2d61b40)
The buggy address belongs to the page:
page:ffffea0002cb5800 count:1 mapcount:0 mapping:ffff88813bff0c40 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0002651b08 ffff88813bff1948 ffff88813bff0c40
raw: 0000000000000000 ffff8880b2d60240 0000000100000003 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b2d61900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880b2d61980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880b2d61a00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
                            ^
 ffff8880b2d61a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880b2d61b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (35):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/28 07:54 linux-4.19.y 3f8a27f9e27b 75c78242 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/20 20:11 linux-4.19.y 3f8a27f9e27b 5bb70014 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/17 08:39 linux-4.19.y 3f8a27f9e27b 3a127a31 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/14 16:58 linux-4.19.y 3f8a27f9e27b 943f4cb8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/11 20:49 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/11 12:07 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/11 00:41 linux-4.19.y 3f8a27f9e27b 3ead01ad .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/10 12:57 linux-4.19.y 3f8a27f9e27b b2488a87 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/09 07:06 linux-4.19.y 3f8a27f9e27b 5fa28208 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/08 23:31 linux-4.19.y 3f8a27f9e27b 060f945e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/08 22:44 linux-4.19.y 3f8a27f9e27b 060f945e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/07 19:32 linux-4.19.y 3f8a27f9e27b a779b11a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/07 16:27 linux-4.19.y 3f8a27f9e27b a779b11a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/04 03:26 linux-4.19.y 3f8a27f9e27b 6d752409 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/03 01:24 linux-4.19.y 3f8a27f9e27b 08977f5d .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/02 10:25 linux-4.19.y 3f8a27f9e27b 08977f5d .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/01 14:13 linux-4.19.y 3f8a27f9e27b a1d8560a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/11/01 10:47 linux-4.19.y 3f8a27f9e27b a1d8560a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/31 18:22 linux-4.19.y 3f8a27f9e27b 2a71366b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/30 15:35 linux-4.19.y 3f8a27f9e27b 2a71366b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/30 11:44 linux-4.19.y 3f8a27f9e27b 2a71366b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/29 23:16 linux-4.19.y 3f8a27f9e27b 2a71366b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/28 23:44 linux-4.19.y 3f8a27f9e27b 8168b69e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/26 13:03 linux-4.19.y 3f8a27f9e27b 2159e4d2 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/25 19:05 linux-4.19.y 3f8a27f9e27b 45645420 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/17 07:00 linux-4.19.y 3f8a27f9e27b 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/17 02:20 linux-4.19.y 3f8a27f9e27b 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/16 11:41 linux-4.19.y 3f8a27f9e27b 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/15 04:59 linux-4.19.y 3f8a27f9e27b 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/14 17:40 linux-4.19.y 3f8a27f9e27b 4954e4b2 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/14 10:00 linux-4.19.y 3f8a27f9e27b 4954e4b2 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/14 09:16 linux-4.19.y 3f8a27f9e27b 4954e4b2 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/07 20:21 linux-4.19.y 3f8a27f9e27b 79a59635 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/10/04 20:25 linux-4.19.y 3f8a27f9e27b eab8f949 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
2022/09/28 07:18 linux-4.19.y 3f8a27f9e27b 75c78242 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Write in extAlloc
* Struck through repros no longer work on HEAD.