BUG: Bad page state in process syz-executor.4 pfn:103aa
page:ffffea000040ea80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103aa
flags: 0xfff18000001042(referenced|workingset|reserved|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff18000001042 ffffea000040ea88 ffffea000040ea88 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: 0 PID: 24931 Comm: syz-executor.4 Not tainted 6.5.0-rc5-syzkaller-01636-gc2e5f4fd1148 #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:728 [inline]
sock_sendmsg+0xd9/0x180 net/socket.c:751
____sys_sendmsg+0x2ac/0x940 net/socket.c:2538
___sys_sendmsg+0x135/0x1d0 net/socket.c:2592
__sys_sendmmsg+0x1a1/0x450 net/socket.c:2678
__do_sys_sendmmsg net/socket.c:2707 [inline]
__se_sys_sendmmsg net/socket.c:2704 [inline]
__x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2704
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f8e9f07cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8e9feba0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f8e9f19bf80 RCX: 00007f8e9f07cae9
RDX: 0000000000000001 RSI: 0000000020000700 RDI: 0000000000000004
RBP: 00007f8e9f0c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f8e9f19bf80 R15: 00007ffe5cf82038
page:ffffea000040ea80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103aa
flags: 0xfff18000001042(referenced|workingset|reserved|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff18000001042 ffffea000040ea88 ffffea000040ea88 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: 0 PID: 24931 Comm: syz-executor.4 Tainted: G B 6.5.0-rc5-syzkaller-01636-gc2e5f4fd1148 #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: 98 68 fd 49 8d 5e ff e9 28 fe ff ff 4c 8b 6c 24 28 e9 12 f4 ff ff e8 97 98 68 fd 48 c7 c6 e0 c3 c7 8a 48 89 df e8 c8 18 a6 fd <0f> 0b e8 31 7d bd fd e9 ca f8 ff ff 4c 89 ef e8 44 7d bd fd e9 2c
RSP: 0018:ffffc9000b7ff798 EFLAGS: 00010246
RAX: 0000000000040000 RBX: ffffea000040ea80 RCX: ffffc90004222000
RDX: 0000000000040000 RSI: ffffffff841d8808 RDI: 0000000000000000
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff1d58a2a
R10: ffffffff8eac5157 R11: 1ffffffff1936501 R12: ffffea000040eab4
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88804355f800
FS: 00007f8e9feba6c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2f721000 CR3: 000000002fd46000 CR4: 00000000003506f0
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:728 [inline]
sock_sendmsg+0xd9/0x180 net/socket.c:751
____sys_sendmsg+0x2ac/0x940 net/socket.c:2538
___sys_sendmsg+0x135/0x1d0 net/socket.c:2592
__sys_sendmmsg+0x1a1/0x450 net/socket.c:2678
__do_sys_sendmmsg net/socket.c:2707 [inline]
__se_sys_sendmmsg net/socket.c:2704 [inline]
__x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2704
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f8e9f07cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8e9feba0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f8e9f19bf80 RCX: 00007f8e9f07cae9
RDX: 0000000000000001 RSI: 0000000020000700 RDI: 0000000000000004
RBP: 00007f8e9f0c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f8e9f19bf80 R15: 00007ffe5cf82038
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: 98 68 fd 49 8d 5e ff e9 28 fe ff ff 4c 8b 6c 24 28 e9 12 f4 ff ff e8 97 98 68 fd 48 c7 c6 e0 c3 c7 8a 48 89 df e8 c8 18 a6 fd <0f> 0b e8 31 7d bd fd e9 ca f8 ff ff 4c 89 ef e8 44 7d bd fd e9 2c
RSP: 0018:ffffc9000b7ff798 EFLAGS: 00010246
RAX: 0000000000040000 RBX: ffffea000040ea80 RCX: ffffc90004222000
RDX: 0000000000040000 RSI: ffffffff841d8808 RDI: 0000000000000000
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff1d58a2a
R10: ffffffff8eac5157 R11: 1ffffffff1936501 R12: ffffea000040eab4
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88804355f800
FS: 00007f8e9feba6c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f54e4575198 CR3: 000000002fd46000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400