syzbot


KASAN: slab-out-of-bounds Read in hfsplus_uni2asc

Status: upstream: reported C repro on 2022/12/04 03:32
Reported-by: syzbot+46f069303109f2aac73b@syzkaller.appspotmail.com
First crash: 569d, last: 481d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: slab-out-of-bounds Read in hfsplus_uni2asc origin:upstream C error 253 20d 467d 0/3 upstream: reported C repro on 2023/03/16 05:02
linux-4.19 KASAN: slab-out-of-bounds Read in hfsplus_uni2asc hfsplus C error 2 552d 576d 0/1 upstream: reported C repro on 2022/11/27 08:50
upstream KASAN: slab-out-of-bounds Read in hfsplus_uni2asc hfs C error 1167 9d02h 575d 0/27 upstream: reported C repro on 2022/11/28 10:02
linux-6.1 KASAN: slab-out-of-bounds Read in hfsplus_uni2asc origin:upstream C 126 14d 463d 0/3 upstream: reported C repro on 2023/03/19 19:39
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/03/02 01:51 27m bisect fix linux-4.14.y job log (0) log
2023/01/29 22:05 25m bisect fix linux-4.14.y job log (0) log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x82a/0x910 fs/hfsplus/unicode.c:179
Read of size 2 at addr ffff8880b323b9cc by task syz-executor841/7983

CPU: 1 PID: 7983 Comm: syz-executor841 Not tainted 4.14.300-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load2_noabort+0x68/0x70 mm/kasan/report.c:428
 hfsplus_uni2asc+0x82a/0x910 fs/hfsplus/unicode.c:179
 hfsplus_readdir+0x6e4/0xd70 fs/hfsplus/dir.c:209
 iterate_dir+0x1a0/0x5e0 fs/readdir.c:52
 SYSC_getdents64 fs/readdir.c:358 [inline]
 SyS_getdents64+0x125/0x230 fs/readdir.c:339
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

Allocated by task 7983:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 __do_kmalloc mm/slab.c:3720 [inline]
 __kmalloc+0x15a/0x400 mm/slab.c:3729
 kmalloc include/linux/slab.h:493 [inline]
 hfsplus_find_init+0x91/0x220 fs/hfsplus/bfind.c:21
 hfsplus_readdir+0x1dc/0xd70 fs/hfsplus/dir.c:146
 iterate_dir+0x1a0/0x5e0 fs/readdir.c:52
 SYSC_getdents64 fs/readdir.c:358 [inline]
 SyS_getdents64+0x125/0x230 fs/readdir.c:339
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8880b323b5c0
 which belongs to the cache kmalloc-2048 of size 2048
The buggy address is located 1036 bytes inside of
 2048-byte region [ffff8880b323b5c0, ffff8880b323bdc0)
The buggy address belongs to the page:
page:ffffea0002cc8e80 count:1 mapcount:0 mapping:ffff8880b323a4c0 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880b323a4c0 0000000000000000 0000000100000003
raw: ffffea0002cd9420 ffff88813fe64948 ffff88813fe74c40 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b323b880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880b323b900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880b323b980: 00 00 00 00 00 00 00 00 00 04 fc fc fc fc fc fc
                                              ^
 ffff8880b323ba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880b323ba80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/04 03:31 linux-4.14.y 179ef7fe8677 e080de16 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-4-14 KASAN: slab-out-of-bounds Read in hfsplus_uni2asc
* Struck through repros no longer work on HEAD.