syzbot


general protection fault in free_swap_cache

Status: premoderation: reported on 2024/08/26 00:27
Reported-by: syzbot+82ed881e0dcfeb9bb131@syzkaller.appspotmail.com
First crash: 33d, last: 33d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in free_swap_cache mm 5 1467d 1518d 0/28 auto-closed as invalid on 2021/01/19 22:14
upstream general protection fault in free_swap_cache (2) mm 5 1024d 1205d 0/28 auto-closed as invalid on 2022/04/07 21:42
upstream general protection fault in free_swap_cache (3) mm 2 582d 596d 0/28 auto-obsoleted due to no activity on 2023/05/25 13:12
upstream general protection fault in free_swap_cache (4) mm reiserfs C done done 1 269d 268d 0/28 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: 22338 Comm: syz.1.4821 Tainted: G        W         5.10.223-syzkaller-01561-g0890c03b8b7d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
RIP: 0010:compound_head include/linux/page-flags.h:188 [inline]
RIP: 0010:PageSwapCache include/linux/page-flags.h:403 [inline]
RIP: 0010:free_swap_cache+0x2b/0x230 mm/swap_state.c:327
Code: 48 89 e5 41 57 41 56 41 55 41 54 53 50 48 89 fb 49 be 00 00 00 00 00 fc ff df e8 50 fa c4 ff 4c 8d 6b 08 4d 89 ef 49 c1 ef 03 <43> 80 3c 37 00 74 08 4c 89 ef e8 16 93 02 00 4d 8b 65 00 44 89 e6
RSP: 0018:ffffc90001087778 EFLAGS: 00010202
RAX: ffffffff81a5aeb0 RBX: 0000000000000000 RCX: ffff8881190b4f00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900010877a8 R08: ffffffff81a5af67 R09: fffff94000860a71
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88813b43f010
R13: 0000000000000008 R14: dffffc0000000000 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055555742d490 CR3: 00000001202ae000 CR4: 00000000003526a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 free_pages_and_swap_cache+0x63/0xa0 mm/swap_state.c:355
 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
 tlb_flush_mmu mm/mmu_gather.c:247 [inline]
 tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:326
 exit_mmap+0x312/0x5c0 mm/mmap.c:3357
 __mmput+0x95/0x2d0 kernel/fork.c:1153
 mmput+0x59/0x170 kernel/fork.c:1176
 exit_mm kernel/exit.c:539 [inline]
 do_exit+0xbda/0x2a50 kernel/exit.c:850
 do_group_exit+0x141/0x310 kernel/exit.c:985
 get_signal+0x10a0/0x1410 kernel/signal.c:2782
 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805
 handle_signal_work kernel/entry/common.c:145 [inline]
 exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline]
 syscall_exit_to_user_mode+0xa2/0x1a0 kernel/entry/common.c:274
 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f1d1faa1e79
Code: Unable to access opcode bytes at RIP 0x7f1d1faa1e4f.
RSP: 002b:00007f1d1e71f0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f1d1fc3df88 RCX: 00007f1d1faa1e79
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f1d1fc3df88
RBP: 00007f1d1fc3df80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1d1fc3df8c
R13: 0000000000000000 R14: 00007ffeb14c5d50 R15: 00007ffeb14c5e38
Modules linked in:
---[ end trace 912419b9ef8f3734 ]---
RIP: 0010:compound_head include/linux/page-flags.h:188 [inline]
RIP: 0010:PageSwapCache include/linux/page-flags.h:403 [inline]
RIP: 0010:free_swap_cache+0x2b/0x230 mm/swap_state.c:327
Code: 48 89 e5 41 57 41 56 41 55 41 54 53 50 48 89 fb 49 be 00 00 00 00 00 fc ff df e8 50 fa c4 ff 4c 8d 6b 08 4d 89 ef 49 c1 ef 03 <43> 80 3c 37 00 74 08 4c 89 ef e8 16 93 02 00 4d 8b 65 00 44 89 e6
RSP: 0018:ffffc90001087778 EFLAGS: 00010202
RAX: ffffffff81a5aeb0 RBX: 0000000000000000 RCX: ffff8881190b4f00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900010877a8 R08: ffffffff81a5af67 R09: fffff94000860a71
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88813b43f010
R13: 0000000000000008 R14: dffffc0000000000 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055555742d4a8 CR3: 000000010d5ed000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	48 89 e5             	mov    %rsp,%rbp
   3:	41 57                	push   %r15
   5:	41 56                	push   %r14
   7:	41 55                	push   %r13
   9:	41 54                	push   %r12
   b:	53                   	push   %rbx
   c:	50                   	push   %rax
   d:	48 89 fb             	mov    %rdi,%rbx
  10:	49 be 00 00 00 00 00 	movabs $0xdffffc0000000000,%r14
  17:	fc ff df
  1a:	e8 50 fa c4 ff       	call   0xffc4fa6f
  1f:	4c 8d 6b 08          	lea    0x8(%rbx),%r13
  23:	4d 89 ef             	mov    %r13,%r15
  26:	49 c1 ef 03          	shr    $0x3,%r15
* 2a:	43 80 3c 37 00       	cmpb   $0x0,(%r15,%r14,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	4c 89 ef             	mov    %r13,%rdi
  34:	e8 16 93 02 00       	call   0x2934f
  39:	4d 8b 65 00          	mov    0x0(%r13),%r12
  3d:	44 89 e6             	mov    %r12d,%esi

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/26 00:26 android13-5.10-lts 0890c03b8b7d d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in free_swap_cache
* Struck through repros no longer work on HEAD.