syzbot


KASAN: slab-out-of-bounds Read in fb_pad_aligned_buffer (2)

Status: moderation: reported on 2025/08/17 12:29
Subsystems: fbdev
[Documentation on labels]
Reported-by: syzbot+2b38be7f13ce5caed88d@syzkaller.appspotmail.com
First crash: 5d23h, last: 5d23h
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in fb_pad_aligned_buffer fbdev 17 7 1891d 2037d 0/29 auto-closed as invalid on 2020/10/12 11:59
linux-4.19 KASAN: slab-out-of-bounds Read in fb_pad_aligned_buffer 17 3 1952d 2030d 0/1 auto-closed as invalid on 2020/08/12 11:53

Sample crash report:
overlayfs: conflicting options: nfs_export=on,metacopy=on
==================================================================
BUG: KASAN: slab-out-of-bounds in __fb_pad_aligned_buffer include/linux/fb.h:641 [inline]
BUG: KASAN: slab-out-of-bounds in fb_pad_aligned_buffer+0x57e/0x5f0 drivers/video/fbdev/core/fbmem.c:96
Read of size 1 at addr ffff8880593d7a10 by task syz.6.4465/21843

CPU: 1 UID: 0 PID: 21843 Comm: syz.6.4465 Not tainted 6.17.0-rc1-next-20250812-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xca/0x240 mm/kasan/report.c:482
 kasan_report+0x118/0x150 mm/kasan/report.c:595
 __fb_pad_aligned_buffer include/linux/fb.h:641 [inline]
 fb_pad_aligned_buffer+0x57e/0x5f0 drivers/video/fbdev/core/fbmem.c:96
 bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:98 [inline]
 bit_putcs+0x1648/0x1a50 drivers/video/fbdev/core/bitblit.c:184
 fbcon_putcs+0x3e5/0x5f0 drivers/video/fbdev/core/fbcon.c:1327
 do_update_region+0x21c/0x440 drivers/tty/vt/vt.c:617
 update_region+0x1ce/0x490 drivers/tty/vt/vt.c:641
 vcs_write+0xd65/0x1260 drivers/tty/vt/vc_screen.c:698
 do_loop_readv_writev fs/read_write.c:850 [inline]
 vfs_writev+0x4b6/0x960 fs/read_write.c:1059
 do_writev+0x14d/0x2d0 fs/read_write.c:1103
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f68db78ebe9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f68dc5ed038 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007f68db9b5fa0 RCX: 00007f68db78ebe9
RDX: 000000000000000e RSI: 0000200000000c40 RDI: 0000000000000004
RBP: 00007f68db811e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f68db9b6038 R14: 00007f68db9b5fa0 R15: 00007fff61c4c208
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880593d7a80 pfn:0x593d4
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f8(unknown)
raw: 00fff00000000040 0000000000000000 dead000000000122 0000000000000000
raw: ffff8880593d7a80 0000000000000000 00000000f8000000 0000000000000000
head: 00fff00000000040 0000000000000000 dead000000000122 0000000000000000
head: ffff8880593d7a80 0000000000000000 00000000f8000000 0000000000000000
head: 00fff00000000002 ffffea000164f501 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x140cc0(GFP_USER|__GFP_COMP), pid 19098, tgid 19083 (syz.1.3690), ts 809460860721, free_ts 809191260089
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
 prep_new_page mm/page_alloc.c:1859 [inline]
 get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
 ___kmalloc_large_node+0x5f/0x1b0 mm/slub.c:4306
 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:4337
 __do_kmalloc_node mm/slub.c:4353 [inline]
 __kmalloc_noprof+0x36f/0x4f0 mm/slub.c:4377
 kmalloc_noprof include/linux/slab.h:909 [inline]
 fbcon_set_font+0x519/0xe90 drivers/video/fbdev/core/fbcon.c:2536
 con_font_set drivers/tty/vt/vt.c:4887 [inline]
 con_font_op+0xcac/0x1070 drivers/tty/vt/vt.c:4934
 vt_k_ioctl drivers/tty/vt/vt_ioctl.c:474 [inline]
 vt_ioctl+0x1a8a/0x1f00 drivers/tty/vt/vt_ioctl.c:751
 tty_ioctl+0x926/0xde0 drivers/tty/tty_io.c:2792
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:598 [inline]
 __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:584
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 19061 tgid 19060 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1395 [inline]
 __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895
 discard_slab mm/slub.c:2753 [inline]
 __put_partials+0x156/0x1a0 mm/slub.c:3218
 put_cpu_partial+0x17c/0x250 mm/slub.c:3293
 __slab_free+0x2d5/0x3c0 mm/slub.c:4550
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:340
 kasan_slab_alloc include/linux/kasan.h:250 [inline]
 slab_post_alloc_hook mm/slub.c:4180 [inline]
 slab_alloc_node mm/slub.c:4229 [inline]
 __do_kmalloc_node mm/slub.c:4364 [inline]
 __kmalloc_noprof+0x224/0x4f0 mm/slub.c:4377
 kmalloc_noprof include/linux/slab.h:909 [inline]
 tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251
 tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
 tomoyo_path_number_perm+0x1e8/0x5a0 security/tomoyo/file.c:723
 security_file_ioctl+0xcb/0x2d0 security/security.c:2982
 __do_sys_ioctl fs/ioctl.c:592 [inline]
 __se_sys_ioctl+0x47/0x170 fs/ioctl.c:584
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8880593d7900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880593d7980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880593d7a00: 00 00 fe fe fe fe fe fe fe fe fe fe fe fe fe fe
                         ^
 ffff8880593d7a80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 ffff8880593d7b00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/13 12:25 linux-next 2674d1eadaa2 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-out-of-bounds Read in fb_pad_aligned_buffer
* Struck through repros no longer work on HEAD.