syzbot


KASAN: vmalloc-out-of-bounds Read in load_module

Status: upstream: reported C repro on 2024/09/27 13:59
Reported-by: syzbot+57348b2507bf71413cfb@syzkaller.appspotmail.com
First crash: 55d, last: 24d
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/10/14 21:56 0m retest repro android13-5.10-lts error
2024/10/14 21:56 0m retest repro android13-5.10-lts error
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/10/27 18:03 1h41m bisect fix android13-5.10-lts OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: vmalloc-out-of-bounds in elf_validity_check kernel/module.c:3073 [inline]
BUG: KASAN: vmalloc-out-of-bounds in load_module+0x2a80/0x5aa0 kernel/module.c:4008
Read of size 1 at addr ffffc9000009cfff by task syz-executor468/287

CPU: 0 PID: 287 Comm: syz-executor468 Not tainted 5.10.225-syzkaller-00513-g8d23314f588a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
 print_address_description+0x81/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0x179/0x1c0 mm/kasan/report.c:452
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
 elf_validity_check kernel/module.c:3073 [inline]
 load_module+0x2a80/0x5aa0 kernel/module.c:4008
 __do_sys_init_module kernel/module.c:4226 [inline]
 __se_sys_init_module+0x238/0x2d0 kernel/module.c:4209
 __x64_sys_init_module+0x76/0x80 kernel/module.c:4209
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f16af2582a9
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc78f18928 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
RAX: ffffffffffffffda RBX: 00007ffc78f18b08 RCX: 00007f16af2582a9
RDX: 0000000000000000 RSI: 0000000000000578 RDI: 0000000020000040
RBP: 00007f16af2cb610 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc78f18af8 R14: 0000000000000001 R15: 0000000000000001


Memory state around the buggy address:
 ffffc9000009ce80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc9000009cf00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc9000009cf80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
                                                                ^
 ffffc9000009d000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc9000009d080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
BUG: unable to handle page fault for address: ffffc9000009cfff
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 100000067 P4D 100000067 PUD 10013a067 PMD 10013b067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 287 Comm: syz-executor468 Tainted: G    B             5.10.225-syzkaller-00513-g8d23314f588a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:elf_validity_check kernel/module.c:3073 [inline]
RIP: 0010:load_module+0x3f4/0x5aa0 kernel/module.c:4008
Code: 48 ba 00 00 00 00 00 fc ff df 49 8b 06 48 89 44 24 48 4a 8d 5c 38 ff 48 89 d8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 77 26 00 00 <80> 3b 00 4c 8b 7c 24 70 0f 85 84 14 00 00 48 8d 5e 04 48 89 d8 48
RSP: 0018:ffffc90000b47b60 EFLAGS: 00010286
RAX: ffff88812141a701 RBX: ffffc9000009cfff RCX: ffff88812141a780
RDX: dffffc0000000000 RSI: ffffc9000009d3c2 RDI: 00000000ffffffff
RBP: ffffc90000b47d50 R08: ffffffff813e2a7b R09: 0000000000000003
R10: fffffbfff0e10c48 R11: dffffc0000000001 R12: ffffc90000b47dc0
R13: ffffc90000b47de8 R14: ffffc9000009d462 R15: ffffc9000009d000
FS:  000055555b9c7380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc9000009cfff CR3: 0000000120eaa000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __do_sys_init_module kernel/module.c:4226 [inline]
 __se_sys_init_module+0x238/0x2d0 kernel/module.c:4209
 __x64_sys_init_module+0x76/0x80 kernel/module.c:4209
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f16af2582a9
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc78f18928 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
RAX: ffffffffffffffda RBX: 00007ffc78f18b08 RCX: 00007f16af2582a9
RDX: 0000000000000000 RSI: 0000000000000578 RDI: 0000000020000040
RBP: 00007f16af2cb610 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc78f18af8 R14: 0000000000000001 R15: 0000000000000001
Modules linked in:
CR2: ffffc9000009cfff
---[ end trace 7448b2055920de71 ]---
RIP: 0010:elf_validity_check kernel/module.c:3073 [inline]
RIP: 0010:load_module+0x3f4/0x5aa0 kernel/module.c:4008
Code: 48 ba 00 00 00 00 00 fc ff df 49 8b 06 48 89 44 24 48 4a 8d 5c 38 ff 48 89 d8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 77 26 00 00 <80> 3b 00 4c 8b 7c 24 70 0f 85 84 14 00 00 48 8d 5e 04 48 89 d8 48
RSP: 0018:ffffc90000b47b60 EFLAGS: 00010286
RAX: ffff88812141a701 RBX: ffffc9000009cfff RCX: ffff88812141a780
RDX: dffffc0000000000 RSI: ffffc9000009d3c2 RDI: 00000000ffffffff
RBP: ffffc90000b47d50 R08: ffffffff813e2a7b R09: 0000000000000003
R10: fffffbfff0e10c48 R11: dffffc0000000001 R12: ffffc90000b47dc0
R13: ffffc90000b47de8 R14: ffffc9000009d462 R15: ffffc9000009d000
FS:  000055555b9c7380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc9000009cfff CR3: 0000000120eaa000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
   7:	fc ff df
   a:	49 8b 06             	mov    (%r14),%rax
   d:	48 89 44 24 48       	mov    %rax,0x48(%rsp)
  12:	4a 8d 5c 38 ff       	lea    -0x1(%rax,%r15,1),%rbx
  17:	48 89 d8             	mov    %rbx,%rax
  1a:	48 c1 e8 03          	shr    $0x3,%rax
  1e:	0f b6 04 10          	movzbl (%rax,%rdx,1),%eax
  22:	84 c0                	test   %al,%al
  24:	0f 85 77 26 00 00    	jne    0x26a1
* 2a:	80 3b 00             	cmpb   $0x0,(%rbx) <-- trapping instruction
  2d:	4c 8b 7c 24 70       	mov    0x70(%rsp),%r15
  32:	0f 85 84 14 00 00    	jne    0x14bc
  38:	48 8d 5e 04          	lea    0x4(%rsi),%rbx
  3c:	48 89 d8             	mov    %rbx,%rax
  3f:	48                   	rex.W

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/27 14:19 android13-5.10-lts 8d23314f588a 9314348a .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: vmalloc-out-of-bounds Read in load_module
2024/09/27 13:46 android13-5.10-lts 8d23314f588a 9314348a .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: vmalloc-out-of-bounds Read in load_module
2024/09/27 14:30 android13-5.10-lts 8d23314f588a 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: vmalloc-out-of-bounds Read in load_module
2024/09/27 14:30 android13-5.10-lts 8d23314f588a 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: vmalloc-out-of-bounds Read in load_module
2024/09/27 14:30 android13-5.10-lts 8d23314f588a 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: vmalloc-out-of-bounds Read in load_module
2024/09/27 13:20 android13-5.10-lts 8d23314f588a 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: vmalloc-out-of-bounds Read in load_module
2024/09/27 13:20 android13-5.10-lts 8d23314f588a 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: vmalloc-out-of-bounds Read in load_module
2024/09/27 13:20 android13-5.10-lts 8d23314f588a 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: vmalloc-out-of-bounds Read in load_module
2024/09/27 13:20 android13-5.10-lts 8d23314f588a 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: vmalloc-out-of-bounds Read in load_module
* Struck through repros no longer work on HEAD.