syzbot


KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer (4)

Status: upstream: reported on 2025/09/22 04:15
Subsystems: fbdev
[Documentation on labels]
Reported-by: syzbot+55e03490a0175b8dd81d@syzkaller.appspotmail.com
First crash: 134d, last: 12d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [fbdev?] KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer (4) 0 (1) 2025/09/22 04:15
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer (3) fbdev 17 1 238d 234d 0/29 auto-obsoleted due to no activity on 2025/06/13 19:08
upstream KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer (2) fbdev 17 2 343d 362d 0/29 auto-obsoleted due to no activity on 2025/03/10 18:04
upstream KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer fbdev 17 1 562d 558d 0/29 auto-obsoleted due to no activity on 2024/07/24 15:18

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in fb_pad_unaligned_buffer+0x22e/0x500 drivers/video/fbdev/core/fbmem.c:110
Read of size 1 at addr ffff88807df91010 by task syz.4.11956/1794

CPU: 0 UID: 0 PID: 1794 Comm: syz.4.11956 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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_unaligned_buffer+0x22e/0x500 drivers/video/fbdev/core/fbmem.c:110
 bit_putcs_unaligned drivers/video/fbdev/core/bitblit.c:129 [inline]
 bit_putcs+0xa65/0x1bc0 drivers/video/fbdev/core/bitblit.c:204
 fbcon_putcs+0x3a6/0x580 drivers/video/fbdev/core/fbcon.c:1320
 do_update_region+0x21c/0x440 drivers/tty/vt/vt.c:618
 update_region+0x1ce/0x490 drivers/tty/vt/vt.c:642
 vcs_write+0xd65/0x1260 drivers/tty/vt/vc_screen.c:685
 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/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7efe31d8efc9
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:00007efe32bc6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007efe31fe5fa0 RCX: 00007efe31d8efc9
RDX: 000000000000000e RSI: 0000200000000c40 RDI: 0000000000000003
RBP: 00007efe31e11f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007efe31fe6038 R14: 00007efe31fe5fa0 R15: 00007ffe3d1a1538
 </TASK>

Allocated by task 23460:
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 poison_kmalloc_redzone mm/kasan/common.c:400 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417
 kasan_kmalloc include/linux/kasan.h:262 [inline]
 __do_kmalloc_node mm/slub.c:5642 [inline]
 __kmalloc_noprof+0x411/0x7f0 mm/slub.c:5654
 kmalloc_noprof include/linux/slab.h:961 [inline]
 fbcon_set_font+0x54d/0xec0 drivers/video/fbdev/core/fbcon.c:2536
 con_font_set drivers/tty/vt/vt.c:4919 [inline]
 con_font_op+0xc08/0xfd0 drivers/tty/vt/vt.c:4959
 vt_k_ioctl drivers/tty/vt/vt_ioctl.c:472 [inline]
 vt_ioctl+0x1a89/0x1f20 drivers/tty/vt/vt_ioctl.c:743
 tty_ioctl+0x929/0xde0 drivers/tty/tty_io.c:2792
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88807df90000
 which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 0 bytes to the right of
 allocated 4112-byte region [ffff88807df90000, ffff88807df91010)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7df90
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801a027280 ffffea0000bab600 dead000000000003
raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801a027280 ffffea0000bab600 dead000000000003
head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000
head: 00fff00000000003 ffffea0001f7e401 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5567, tgid 5567 (start-stop-daem), ts 55083093422, free_ts 55082818661
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850
 prep_new_page mm/page_alloc.c:1858 [inline]
 get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
 alloc_slab_page mm/slub.c:3055 [inline]
 allocate_slab+0x96/0x350 mm/slub.c:3228
 new_slab mm/slub.c:3282 [inline]
 ___slab_alloc+0xe94/0x18a0 mm/slub.c:4651
 __slab_alloc+0x65/0x100 mm/slub.c:4770
 __slab_alloc_node mm/slub.c:4846 [inline]
 slab_alloc_node mm/slub.c:5268 [inline]
 __kmalloc_cache_noprof+0x411/0x6f0 mm/slub.c:5758
 kmalloc_noprof include/linux/slab.h:957 [inline]
 kzalloc_noprof include/linux/slab.h:1094 [inline]
 tomoyo_print_bprm security/tomoyo/audit.c:26 [inline]
 tomoyo_init_log+0x111f/0x1f70 security/tomoyo/audit.c:264
 tomoyo_supervisor+0x340/0x1480 security/tomoyo/common.c:2198
 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline]
 tomoyo_env_perm+0x149/0x1e0 security/tomoyo/environ.c:63
 tomoyo_environ security/tomoyo/domain.c:672 [inline]
 tomoyo_find_next_domain+0x15cf/0x1aa0 security/tomoyo/domain.c:888
 tomoyo_bprm_check_security+0x11c/0x180 security/tomoyo/tomoyo.c:102
 security_bprm_check+0x89/0x270 security/security.c:1341
 search_binary_handler fs/exec.c:1660 [inline]
 exec_binprm fs/exec.c:1702 [inline]
 bprm_execve+0x8ee/0x1450 fs/exec.c:1754
 do_execveat_common+0x510/0x6a0 fs/exec.c:1860
page last free pid 5567 tgid 5567 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1394 [inline]
 __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2906
 discard_slab mm/slub.c:3326 [inline]
 __put_partials+0x146/0x170 mm/slub.c:3872
 put_cpu_partial+0x1f2/0x2e0 mm/slub.c:3947
 __slab_free+0x2b9/0x390 mm/slub.c:5921
 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:352
 kasan_slab_alloc include/linux/kasan.h:252 [inline]
 slab_post_alloc_hook mm/slub.c:4970 [inline]
 slab_alloc_node mm/slub.c:5280 [inline]
 __do_kmalloc_node mm/slub.c:5641 [inline]
 __kmalloc_noprof+0x3c3/0x7f0 mm/slub.c:5654
 kmalloc_noprof include/linux/slab.h:961 [inline]
 tomoyo_add_entry security/tomoyo/common.c:2132 [inline]
 tomoyo_supervisor+0xbd5/0x1480 security/tomoyo/common.c:2204
 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline]
 tomoyo_env_perm+0x149/0x1e0 security/tomoyo/environ.c:63
 tomoyo_environ security/tomoyo/domain.c:672 [inline]
 tomoyo_find_next_domain+0x15cf/0x1aa0 security/tomoyo/domain.c:888
 tomoyo_bprm_check_security+0x11c/0x180 security/tomoyo/tomoyo.c:102
 security_bprm_check+0x89/0x270 security/security.c:1341
 search_binary_handler fs/exec.c:1660 [inline]
 exec_binprm fs/exec.c:1702 [inline]
 bprm_execve+0x8ee/0x1450 fs/exec.c:1754
 do_execveat_common+0x510/0x6a0 fs/exec.c:1860
 do_execve fs/exec.c:1934 [inline]
 __do_sys_execve fs/exec.c:2010 [inline]
 __se_sys_execve fs/exec.c:2005 [inline]
 __x64_sys_execve+0x94/0xb0 fs/exec.c:2005

Memory state around the buggy address:
 ffff88807df90f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88807df90f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88807df91000: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                         ^
 ffff88807df91080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88807df91100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/27 19:37 upstream fd57572253bc fd2207e7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer
2025/10/14 17:27 upstream 3a8660878839 b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer
2025/10/13 01:58 upstream 67029a49db6c ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer
2025/09/29 02:36 upstream 8f9736633f8c 001c9061 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer
2025/09/02 15:15 upstream b320789d6883 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer
2025/07/13 19:50 upstream 3f31a806a62e 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer
2025/09/22 04:14 upstream f975f08c2e89 67c37560 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer
2025/10/14 01:11 linux-next 52ba76324a9d b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer
2025/06/28 04:45 linux-next 2aeda9592360 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-out-of-bounds Read in fb_pad_unaligned_buffer
2025/09/19 22:03 linux-next 846bd2225ec3 67c37560 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: use-after-free Read in fb_pad_unaligned_buffer
* Struck through repros no longer work on HEAD.