BUG: Bad page state in process syz-executor.1 pfn:10395
page:ffffea000040e540 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10395
flags: 0xfff18000001042(referenced|workingset|reserved|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff18000001042 ffffea000040e548 ffffea000040e548 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
page_owner info is not present (never set?)
Modules linked in:
CPU: 1 PID: 16694 Comm: syz-executor.1 Not tainted 6.5.0-rc5-syzkaller-00243-g9106536c1aa3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x125/0x1b0 lib/dump_stack.c:106
bad_page+0xb4/0x200 mm/page_alloc.c:533
free_page_is_bad_report mm/page_alloc.c:974 [inline]
free_page_is_bad mm/page_alloc.c:984 [inline]
free_pages_prepare mm/page_alloc.c:1153 [inline]
free_unref_page_prepare+0x598/0xb90 mm/page_alloc.c:2348
free_unref_page+0x33/0x3b0 mm/page_alloc.c:2443
__folio_put_small mm/swap.c:106 [inline]
__folio_put+0xc5/0x140 mm/swap.c:129
folio_put include/linux/mm.h:1440 [inline]
put_page include/linux/mm.h:1509 [inline]
extract_user_to_sg lib/scatterlist.c:1151 [inline]
extract_iter_to_sg lib/scatterlist.c:1349 [inline]
extract_iter_to_sg+0x1604/0x19e0 lib/scatterlist.c:1339
hash_sendmsg+0x459/0x1030 crypto/algif_hash.c:119
sock_sendmsg_nosec net/socket.c:725 [inline]
sock_sendmsg+0xd9/0x180 net/socket.c:748
__sys_sendto+0x255/0x340 net/socket.c:2134
__do_sys_sendto net/socket.c:2146 [inline]
__se_sys_sendto net/socket.c:2142 [inline]
__ia32_sys_sendto+0xdd/0x1b0 net/socket.c:2142
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
RIP: 0023:0xf7f96579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f7f915ac EFLAGS: 00000292 ORIG_RAX: 0000000000000171
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000020000080
RDX: 00000000fffffd40 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
page:ffffea000040e540 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10395
flags: 0xfff18000001042(referenced|workingset|reserved|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff18000001042 ffffea000040e548 ffffea000040e548 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0)
page_owner info is not present (never set?)
------------[ cut here ]------------
kernel BUG at include/linux/mm.h:1027!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 16694 Comm: syz-executor.1 Tainted: G B 6.5.0-rc5-syzkaller-00243-g9106536c1aa3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
RIP: 0010:put_page_testzero include/linux/mm.h:1027 [inline]
RIP: 0010:folio_put_testzero include/linux/mm.h:1033 [inline]
RIP: 0010:folio_put include/linux/mm.h:1439 [inline]
RIP: 0010:put_page include/linux/mm.h:1509 [inline]
RIP: 0010:extract_user_to_sg lib/scatterlist.c:1151 [inline]
RIP: 0010:extract_iter_to_sg lib/scatterlist.c:1349 [inline]
RIP: 0010:extract_iter_to_sg+0x1768/0x19e0 lib/scatterlist.c:1339
Code: 73 69 fd 49 8d 5e ff e9 28 fe ff ff 4c 8b 6c 24 28 e9 12 f4 ff ff e8 87 73 69 fd 48 c7 c6 e0 b3 c7 8a 48 89 df e8 f8 18 a6 fd <0f> 0b e8 61 7d bd fd e9 ca f8 ff ff 4c 89 ef e8 74 7d bd fd e9 2c
RSP: 0018:ffffc9000b20fa70 EFLAGS: 00010246
RAX: 0000000000040000 RBX: ffffea000040e540 RCX: ffffc9000c8a4000
RDX: 0000000000040000 RSI: ffffffff841c9528 RDI: 0000000000000000
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff1d573ea
R10: ffffffff8eab9f57 R11: 1ffffffff1936419 R12: ffffea000040e574
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88804a2ea800
FS: 0000000000000000(0000) GS:ffff8880b9900000(0063) knlGS:00000000f7f91b40
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00000000f735763c CR3: 000000001a772000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hash_sendmsg+0x459/0x1030 crypto/algif_hash.c:119
sock_sendmsg_nosec net/socket.c:725 [inline]
sock_sendmsg+0xd9/0x180 net/socket.c:748
__sys_sendto+0x255/0x340 net/socket.c:2134
__do_sys_sendto net/socket.c:2146 [inline]
__se_sys_sendto net/socket.c:2142 [inline]
__ia32_sys_sendto+0xdd/0x1b0 net/socket.c:2142
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
RIP: 0023:0xf7f96579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f7f915ac EFLAGS: 00000292 ORIG_RAX: 0000000000000171
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000020000080
RDX: 00000000fffffd40 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:put_page_testzero include/linux/mm.h:1027 [inline]
RIP: 0010:folio_put_testzero include/linux/mm.h:1033 [inline]
RIP: 0010:folio_put include/linux/mm.h:1439 [inline]
RIP: 0010:put_page include/linux/mm.h:1509 [inline]
RIP: 0010:extract_user_to_sg lib/scatterlist.c:1151 [inline]
RIP: 0010:extract_iter_to_sg lib/scatterlist.c:1349 [inline]
RIP: 0010:extract_iter_to_sg+0x1768/0x19e0 lib/scatterlist.c:1339
Code: 73 69 fd 49 8d 5e ff e9 28 fe ff ff 4c 8b 6c 24 28 e9 12 f4 ff ff e8 87 73 69 fd 48 c7 c6 e0 b3 c7 8a 48 89 df e8 f8 18 a6 fd <0f> 0b e8 61 7d bd fd e9 ca f8 ff ff 4c 89 ef e8 74 7d bd fd e9 2c
RSP: 0018:ffffc9000b20fa70 EFLAGS: 00010246
RAX: 0000000000040000 RBX: ffffea000040e540 RCX: ffffc9000c8a4000
RDX: 0000000000040000 RSI: ffffffff841c9528 RDI: 0000000000000000
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff1d573ea
R10: ffffffff8eab9f57 R11: 1ffffffff1936419 R12: ffffea000040e574
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88804a2ea800
FS: 0000000000000000(0000) GS:ffff8880b9800000(0063) knlGS:00000000f7f91b40
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00007fffdb634ef8 CR3: 000000001a772000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 2 bytes skipped:
0: 10 06 adc %al,(%rsi)
2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi
6: 10 07 adc %al,(%rdi)
8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi
c: 10 08 adc %cl,(%rax)
e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi
1e: 00 51 52 add %dl,0x52(%rcx)
21: 55 push %rbp
22: 89 e5 mov %esp,%ebp
24: 0f 34 sysenter
26: cd 80 int $0x80
* 28: 5d pop %rbp <-- trapping instruction
29: 5a pop %rdx
2a: 59 pop %rcx
2b: c3 ret
2c: 90 nop
2d: 90 nop
2e: 90 nop
2f: 90 nop
30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi
37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi