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

Status: upstream: reported C repro on 2026/10/30 19:57
Reported-by: syzbot+d5ea132b00a98c5392e0@syzkaller.appspotmail.com
First crash: 5d07h, last: 16h49m
▶ ▼ Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in bcmp net 19 syz, C error done 907 1380d 2701d 22/29 fixed on 2023/02/24 13:50
android-5-15 KASAN: use-after-free Read in bcmp 19 syz, C 8 12d 15d 0/2 upstream: reported C repro on 2026/10/16 04:26
linux-6.1 KASAN: use-after-free Read in bcmp 19 2 2d18h 2d18h 0/3 upstream: reported on 2026/10/28 18:11
android-6-12 KASAN: slab-use-after-free Read in bcmp 19 syz, C 30 9d20h 18d 0/1 premoderation: reported C repro on 2026/10/12 20:33
upstream KMSAN: uninit-value in bcmp (3) ntfs3 19 syz, C error 625 330d 810d 29/29 fixed on 2026/01/07 12:29
upstream KASAN: use-after-free Read in bcmp ntfs3 19 syz, C done 289 1048d 1207d 25/29 fixed on 2023/12/21 03:45
upstream KMSAN: uninit-value in bcmp (2) sound 7 syz, C 7 999d 1021d 25/29 fixed on 2024/04/10 03:59

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in memcmp lib/string.c:942 [inline]
BUG: KASAN: use-after-free in bcmp+0x81/0xd0 lib/string.c:964
Read of size 1 at addr ffff88811f1280a0 by task syz-executor167/299

CPU: 1 PID: 299 Comm: syz-executor167 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0x100/0x140 mm/kasan/report.c:452
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
 memcmp lib/string.c:942 [inline]
 bcmp+0x81/0xd0 lib/string.c:964
 ext4_xattr_value_same+0x147/0x1d0 fs/ext4/xattr.c:2258
 ext4_xattr_set_handle+0x7d8/0x12b0 fs/ext4/xattr.c:2380
 ext4_xattr_set+0x1f3/0x310 fs/ext4/xattr.c:2503
 ext4_xattr_security_set+0x3b/0x50 fs/ext4/xattr_security.c:30
 __vfs_setxattr+0x3e2/0x430 fs/xattr.c:177
 __vfs_setxattr_noperm+0x10e/0x4d0 fs/xattr.c:208
 __vfs_setxattr_locked+0x203/0x220 fs/xattr.c:266
 vfs_setxattr+0x8d/0x1c0 fs/xattr.c:283
 setxattr+0x1df/0x3f0 fs/xattr.c:548
 path_setxattr+0x11f/0x230 fs/xattr.c:567
 __do_sys_lsetxattr fs/xattr.c:589 [inline]
 __se_sys_lsetxattr fs/xattr.c:585 [inline]
 __x64_sys_lsetxattr+0xc2/0xe0 fs/xattr.c:585
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f3356543309
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 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 d0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3356517148 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd
RAX: ffffffffffffffda RBX: 0000000000000040 RCX: 00007f3356543309
RDX: 0000200000000100 RSI: 0000200000000080 RDI: 0000200000000000
RBP: 0000200000000000 R08: 0000000000000000 R09: 203a6362696c6720
R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000080
R13: 0000200000000100 R14: 00007ffed1b96830 R15: 00007ffed1b96918

The buggy address belongs to the page:
page:ffffea00047c4a00 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x11f128
flags: 0x4000000000000000()
raw: 4000000000000000 ffffea00047c5208 ffffea000479e208 0000000000000000
raw: 0000000000000001 0000000000000003 00000000ffffff7f 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x8100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|0x8000000), pid 282, ts 19482217225, free_ts 19497908015
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x176/0x190 mm/page_alloc.c:2462
 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384
 __alloc_pages include/linux/gfp.h:544 [inline]
 __alloc_pages_node include/linux/gfp.h:557 [inline]
 alloc_pages_node include/linux/gfp.h:571 [inline]
 alloc_pages include/linux/gfp.h:590 [inline]
 do_anonymous_page mm/memory.c:3963 [inline]
 handle_pte_fault+0x153b/0x3910 mm/memory.c:4795
 __handle_mm_fault mm/memory.c:4953 [inline]
 handle_mm_fault+0xf86/0x1720 mm/memory.c:5367
 do_user_addr_fault+0x576/0xe20 arch/x86/mm/fault.c:1343
 handle_page_fault arch/x86/mm/fault.c:1436 [inline]
 exc_page_fault+0x5a/0xc0 arch/x86/mm/fault.c:1492
 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1349 [inline]
 free_pcp_prepare mm/page_alloc.c:1421 [inline]
 free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336
 free_unref_page_list+0x129/0x9c0 mm/page_alloc.c:3443
 release_pages+0xe41/0xe90 mm/swap.c:1103
 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:356
 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
 tlb_flush_mmu mm/mmu_gather.c:247 [inline]
 tlb_finish_mmu+0x17e/0x310 mm/mmu_gather.c:326
 unmap_region+0x355/0x3c0 mm/mmap.c:2811
 __do_munmap+0x63c/0x850 mm/mmap.c:3041
 __vm_munmap mm/mmap.c:3094 [inline]
 __do_sys_munmap mm/mmap.c:3120 [inline]
 __se_sys_munmap+0x12c/0x1c0 mm/mmap.c:3116
 __x64_sys_munmap+0x5b/0x70 mm/mmap.c:3116
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
 ffff88811f127f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88811f128000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811f128080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                               ^
 ffff88811f128100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88811f128180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/30 19:51 android13-5.10-lts f61a392235e0 0ec395f8 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in bcmp
2026/10/26 05:08 android13-5.10-lts f61a392235e0 1d9ca40b .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: slab-out-of-bounds Read in bcmp
* Struck through repros no longer work on HEAD.