syzbot


KASAN: null-ptr-deref Write in vm_area_free_no_check

Status: upstream: reported C repro on 2023/01/24 12:55
Bug presence: origin:downstream
[Documentation on labels]
Reported-by: syzbot+5c1579c674dec9434bb0@syzkaller.appspotmail.com
First crash: 677d, last: 7d19h
Cause bisection: failed (error log, bisect log)
  
Fix bisection: failed (error log, bisect log)
  
Bug presence (3)
Date Name Commit Repro Result
2023/05/03 android13-5.15-lts (ToT) 19c0ed55a470 C [report] KASAN: null-ptr-deref Write in vm_area_free_no_check
2023/05/02 lts (merge base) d86dfc4d95cd C Didn't crash
2023/05/02 upstream (ToT) 21d2be646007 C Didn't crash
Last patch testing requests (8)
Created Duration User Patch Repo Result
2024/11/23 23:16 5m retest repro android13-5.15-lts report log
2024/09/14 18:16 7m retest repro android13-5.15-lts report log
2024/07/06 17:15 9m retest repro android13-5.15-lts report log
2024/04/27 15:37 1h37m retest repro android13-5.15-lts report log
2024/02/16 22:50 16m retest repro android13-5.15-lts report log
2023/12/08 22:34 12m retest repro android13-5.15-lts report log
2023/09/13 03:40 11m retest repro android13-5.15-lts report log
2023/04/07 11:09 17m tudor.ambarus@linaro.org git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-5.15.y OK log

Sample crash report:
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
 </TASK>
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: null-ptr-deref in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:167 [inline]
BUG: KASAN: null-ptr-deref in __refcount_sub_and_test include/linux/refcount.h:272 [inline]
BUG: KASAN: null-ptr-deref in __refcount_dec_and_test include/linux/refcount.h:315 [inline]
BUG: KASAN: null-ptr-deref in refcount_dec_and_test include/linux/refcount.h:333 [inline]
BUG: KASAN: null-ptr-deref in kref_put include/linux/kref.h:64 [inline]
BUG: KASAN: null-ptr-deref in anon_vma_name_put include/linux/mm_inline.h:365 [inline]
BUG: KASAN: null-ptr-deref in free_anon_vma_name include/linux/mm_inline.h:396 [inline]
BUG: KASAN: null-ptr-deref in vm_area_free_no_check+0x7f/0x150 kernel/fork.c:405
Write of size 4 at addr 0000000000000001 by task syz-executor416/327

CPU: 0 PID: 327 Comm: syz-executor416 Not tainted 5.15.80-syzkaller-01018-ge66b45d52787 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 __kasan_report mm/kasan/report.c:439 [inline]
 kasan_report+0x19c/0x1f0 mm/kasan/report.c:452
 kasan_check_range+0x2aa/0x2e0 mm/kasan/generic.c:189
 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37
 instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
 atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:167 [inline]
 __refcount_sub_and_test include/linux/refcount.h:272 [inline]
 __refcount_dec_and_test include/linux/refcount.h:315 [inline]
 refcount_dec_and_test include/linux/refcount.h:333 [inline]
 kref_put include/linux/kref.h:64 [inline]
 anon_vma_name_put include/linux/mm_inline.h:365 [inline]
 free_anon_vma_name include/linux/mm_inline.h:396 [inline]
 vm_area_free_no_check+0x7f/0x150 kernel/fork.c:405
 vm_area_free kernel/fork.c:418 [inline]
 dup_mmap+0xc40/0xf10 kernel/fork.c:680
 dup_mm+0x8e/0x2e0 kernel/fork.c:1513
 copy_mm+0x108/0x1b0 kernel/fork.c:1565
 copy_process+0x1295/0x3250 kernel/fork.c:2256
 kernel_clone+0x21d/0x9c0 kernel/fork.c:2659
 __do_sys_clone kernel/fork.c:2785 [inline]
 __se_sys_clone kernel/fork.c:2769 [inline]
 __x64_sys_clone+0x289/0x310 kernel/fork.c:2769
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fb2833440f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff9fbac4d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fb2833440f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007fff9fbac4f0 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
 </TASK>
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000001
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 11f0db067 P4D 11f0db067 PUD 11f0de067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 327 Comm: syz-executor416 Tainted: G    B             5.15.80-syzkaller-01018-ge66b45d52787 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:168 [inline]
RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline]
RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline]
RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline]
RIP: 0010:kref_put include/linux/kref.h:64 [inline]
RIP: 0010:anon_vma_name_put include/linux/mm_inline.h:365 [inline]
RIP: 0010:free_anon_vma_name include/linux/mm_inline.h:396 [inline]
RIP: 0010:vm_area_free_no_check+0x85/0x150 kernel/fork.c:405
Code: 42 80 3c 20 00 74 08 48 89 df e8 16 28 73 00 48 8b 1b 48 85 db 74 3a 48 89 df be 04 00 00 00 e8 11 2a 73 00 41 bc ff ff ff ff <f0> 44 0f c1 23 bf 01 00 00 00 44 89 e6 e8 e9 59 30 00 41 83 fc 01
RSP: 0018:ffffc90000947920 EFLAGS: 00010246
RAX: ffff8881071fe200 RBX: 0000000000000001 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000286 RDI: 0000000000000001
RBP: ffffc90000947950 R08: ffffffff814342f3 R09: fffffbfff0e502f9
R10: fffffbfff0e502f9 R11: 1ffffffff0e502f8 R12: 00000000ffffffff
R13: 1ffff11023e1bbab R14: ffff88811f0ddcb8 R15: ffff88811f0ddd58
FS:  0000555556576300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000001 CR3: 000000011f0d2000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 vm_area_free kernel/fork.c:418 [inline]
 dup_mmap+0xc40/0xf10 kernel/fork.c:680
 dup_mm+0x8e/0x2e0 kernel/fork.c:1513
 copy_mm+0x108/0x1b0 kernel/fork.c:1565
 copy_process+0x1295/0x3250 kernel/fork.c:2256
 kernel_clone+0x21d/0x9c0 kernel/fork.c:2659
 __do_sys_clone kernel/fork.c:2785 [inline]
 __se_sys_clone kernel/fork.c:2769 [inline]
 __x64_sys_clone+0x289/0x310 kernel/fork.c:2769
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fb2833440f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff9fbac4d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fb2833440f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007fff9fbac4f0 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
CR2: 0000000000000001
---[ end trace 7bdbfef15b7ba23c ]---
RIP: 0010:atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:168 [inline]
RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline]
RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline]
RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline]
RIP: 0010:kref_put include/linux/kref.h:64 [inline]
RIP: 0010:anon_vma_name_put include/linux/mm_inline.h:365 [inline]
RIP: 0010:free_anon_vma_name include/linux/mm_inline.h:396 [inline]
RIP: 0010:vm_area_free_no_check+0x85/0x150 kernel/fork.c:405
Code: 42 80 3c 20 00 74 08 48 89 df e8 16 28 73 00 48 8b 1b 48 85 db 74 3a 48 89 df be 04 00 00 00 e8 11 2a 73 00 41 bc ff ff ff ff <f0> 44 0f c1 23 bf 01 00 00 00 44 89 e6 e8 e9 59 30 00 41 83 fc 01
RSP: 0018:ffffc90000947920 EFLAGS: 00010246
RAX: ffff8881071fe200 RBX: 0000000000000001 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000286 RDI: 0000000000000001
RBP: ffffc90000947950 R08: ffffffff814342f3 R09: fffffbfff0e502f9
R10: fffffbfff0e502f9 R11: 1ffffffff0e502f8 R12: 00000000ffffffff
R13: 1ffff11023e1bbab R14: ffff88811f0ddcb8 R15: ffff88811f0ddd58
FS:  0000555556576300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000001 CR3: 000000011f0d2000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1)
   5:	74 08                	je     0xf
   7:	48 89 df             	mov    %rbx,%rdi
   a:	e8 16 28 73 00       	callq  0x732825
   f:	48 8b 1b             	mov    (%rbx),%rbx
  12:	48 85 db             	test   %rbx,%rbx
  15:	74 3a                	je     0x51
  17:	48 89 df             	mov    %rbx,%rdi
  1a:	be 04 00 00 00       	mov    $0x4,%esi
  1f:	e8 11 2a 73 00       	callq  0x732a35
  24:	41 bc ff ff ff ff    	mov    $0xffffffff,%r12d
* 2a:	f0 44 0f c1 23       	lock xadd %r12d,(%rbx) <-- trapping instruction
  2f:	bf 01 00 00 00       	mov    $0x1,%edi
  34:	44 89 e6             	mov    %r12d,%esi
  37:	e8 e9 59 30 00       	callq  0x305a25
  3c:	41 83 fc 01          	cmp    $0x1,%r12d

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/24 12:47 android13-5.15-lts e66b45d52787 9dfcf09c .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: null-ptr-deref Write in vm_area_free_no_check
2023/01/24 12:36 android13-5.15-lts e66b45d52787 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: null-ptr-deref Write in vm_area_free_no_check
2024/07/26 08:12 android13-5.15-lts 5356d2f17edf 3f86dfed .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/11/24 22:30 android13-5.15-lts 61cfd264993d 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/11/18 08:15 android13-5.15-lts 61cfd264993d cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/11/13 08:40 android13-5.15-lts 61cfd264993d 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/10/17 01:16 android13-5.15-lts 754f8cc9b7de 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/10/11 10:41 android13-5.15-lts ea586874d2f9 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/10/11 03:02 android13-5.15-lts ea586874d2f9 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/10/11 02:21 android13-5.15-lts ea586874d2f9 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/10/06 04:25 android13-5.15-lts ea586874d2f9 db17ad9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/09/30 21:55 android13-5.15-lts ea586874d2f9 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/09/25 04:37 android13-5.15-lts ea586874d2f9 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/08/30 00:06 android13-5.15-lts 83c56fbab45d ce731e62 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/08/20 23:03 android13-5.15-lts 1463976ddc64 d216d8a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/08/13 10:29 android13-5.15-lts 1463976ddc64 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Write in vm_area_free_no_check
2023/08/08 13:45 android13-5.15-lts 1463976ddc64 9552ae77 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/07/14 11:07 android13-5.15-lts 879959450ec7 d624500f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/06/30 18:21 android13-5.15-lts 241da2ad5601 af3053d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/06/22 20:55 android13-5.15-lts 565c3abfa129 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/06/13 17:27 android13-5.15-lts 19c0ed55a470 749afb64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/06/06 15:47 android13-5.15-lts 19c0ed55a470 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/05/28 02:57 android13-5.15-lts 19c0ed55a470 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Write in vm_area_free_no_check
2023/05/24 05:28 android13-5.15-lts 19c0ed55a470 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Write in vm_area_free_no_check
2023/05/19 09:22 android13-5.15-lts 19c0ed55a470 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/04/20 00:27 android13-5.15-lts 7364b7abbafb a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Write in vm_area_free_no_check
2023/03/29 02:52 android13-5.15-lts 7364b7abbafb fc067f05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/03/17 04:15 android13-5.15-lts 5448b2fda85f 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/02/09 23:49 android13-5.15-lts 5020746bff95 07980f9d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/02/08 22:02 android13-5.15-lts 5020746bff95 fc9c934e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/02/07 09:59 android13-5.15-lts 7e0097918ff8 5bc3be51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/02/06 22:30 android13-5.15-lts 7e0097918ff8 0a9c11b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
2023/02/02 23:13 android13-5.15-lts cab35cbd710c 16d19e30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf KASAN: use-after-free Write in vm_area_free_no_check
* Struck through repros no longer work on HEAD.