syzbot


general protection fault in free_swap_cache (3)

Status: auto-obsoleted due to no activity on 2023/05/25 13:12
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+10bbd0e689f32b9768c7@syzkaller.appspotmail.com
First crash: 471d, last: 453d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in free_swap_cache mm 5 1339d 1390d 0/26 auto-closed as invalid on 2021/01/19 22:14
upstream general protection fault in free_swap_cache (2) mm 5 896d 1076d 0/26 auto-closed as invalid on 2022/04/07 21:42
upstream general protection fault in free_swap_cache (4) mm reiserfs C done done 1 140d 139d 0/26 auto-obsoleted due to no activity on 2024/04/12 13:13

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 1 PID: 25310 Comm: syz-executor.0 Not tainted 6.2.0-syzkaller-09238-gd2980d8d8265 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023
RIP: 0010:_compound_head include/linux/page-flags.h:251 [inline]
RIP: 0010:free_swap_cache+0x25/0x3d0 mm/swap_state.c:288
Code: 00 0f 1f 40 00 66 0f 1f 00 41 54 55 48 89 fd 53 e8 10 20 b7 ff 48 8d 7d 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 35 03 00 00 4c 8b 65 08 31 ff 4c 89 e3 83 e3 01
RSP: 0018:ffffc90015907658 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff888046044a18 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff81cda830 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000200 R11: 0000000000000000 R12: 0000000000000200
R13: dffffc0000000000 R14: ffff888046044a10 R15: 0000000000000200
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b32823000 CR3: 0000000043d1a000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 free_pages_and_swap_cache+0x60/0xa0 mm/swap_state.c:316
 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:97
 zap_pte_range mm/memory.c:1487 [inline]
 zap_pmd_range mm/memory.c:1536 [inline]
 zap_pud_range mm/memory.c:1565 [inline]
 zap_p4d_range mm/memory.c:1586 [inline]
 unmap_page_range+0x2605/0x3ce0 mm/memory.c:1607
 unmap_single_vma+0x194/0x2a0 mm/memory.c:1653
 unmap_vmas+0x234/0x380 mm/memory.c:1692
 exit_mmap+0x190/0x7d0 mm/mmap.c:3036
 __mmput+0x128/0x4c0 kernel/fork.c:1209
 mmput+0x60/0x70 kernel/fork.c:1231
 exit_mm kernel/exit.c:563 [inline]
 do_exit+0x9d7/0x2a40 kernel/exit.c:856
 do_group_exit+0xd4/0x2a0 kernel/exit.c:1019
 get_signal+0x2315/0x25b0 kernel/signal.c:2859
 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:306
 exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
 exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:203
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296
 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff5ff28c0f9
Code: Unable to access opcode bytes at 0x7ff5ff28c0cf.
RSP: 002b:00007ff5fddfe218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007ff5ff3abf88 RCX: 00007ff5ff28c0f9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007ff5ff3abf88
RBP: 00007ff5ff3abf80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff5ff3abf8c
R13: 00007ff5ff4cfb1f R14: 00007ff5fddfe300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:_compound_head include/linux/page-flags.h:251 [inline]
RIP: 0010:free_swap_cache+0x25/0x3d0 mm/swap_state.c:288
Code: 00 0f 1f 40 00 66 0f 1f 00 41 54 55 48 89 fd 53 e8 10 20 b7 ff 48 8d 7d 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 35 03 00 00 4c 8b 65 08 31 ff 4c 89 e3 83 e3 01
RSP: 0018:ffffc90015907658 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff888046044a18 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff81cda830 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000200 R11: 0000000000000000 R12: 0000000000000200
R13: dffffc0000000000 R14: ffff888046044a10 R15: 0000000000000200
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b33023000 CR3: 0000000043b84000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	0f 1f 40 00          	nopl   0x0(%rax)
   4:	66 0f 1f 00          	nopw   (%rax)
   8:	41 54                	push   %r12
   a:	55                   	push   %rbp
   b:	48 89 fd             	mov    %rdi,%rbp
   e:	53                   	push   %rbx
   f:	e8 10 20 b7 ff       	callq  0xffb72024
  14:	48 8d 7d 08          	lea    0x8(%rbp),%rdi
  18:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1f:	fc ff df
  22:	48 89 fa             	mov    %rdi,%rdx
  25:	48 c1 ea 03          	shr    $0x3,%rdx
* 29:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2d:	0f 85 35 03 00 00    	jne    0x368
  33:	4c 8b 65 08          	mov    0x8(%rbp),%r12
  37:	31 ff                	xor    %edi,%edi
  39:	4c 89 e3             	mov    %r12,%rbx
  3c:	83 e3 01             	and    $0x1,%ebx

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/24 13:11 upstream d2980d8d8265 9e2ebb3c .config console log report info ci-upstream-kasan-gce general protection fault in free_swap_cache
2023/02/06 18:41 linux-next 129af7708234 0a9c11b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in free_swap_cache
* Struck through repros no longer work on HEAD.