BUG: Bad page state in process syz-executor383 pfn:10390
page:ffffea000040e400 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10390
flags: 0xfff18000001042(referenced|workingset|reserved|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff18000001042 ffffea000040e408 ffffea000040e408 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: 5098 Comm: syz-executor383 Not tainted 6.5.0-rc1-syzkaller-00259-g831fe284d827 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/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:1423 [inline]
put_page include/linux/mm.h:1492 [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_sendmsg+0x6ac/0x940 net/socket.c:2494
___sys_sendmsg+0x135/0x1d0 net/socket.c:2548
__sys_sendmsg+0x117/0x1e0 net/socket.c:2577
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:0x7fcc6a82f3e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 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:00007fcc6a7f0238 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fcc6a8b9328 RCX: 00007fcc6a82f3e9
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000004
RBP: 00007fcc6a8b9320 R08: 00007fcc6a7f06c0 R09: 00007fcc6a7f06c0
R10: 00007fcc6a7f06c0 R11: 0000000000000246 R12: 00007fcc6a8b932c
R13: 0000000000000000 R14: 00007ffe147057c0 R15: 00007ffe147058a8
page:ffffea000040e400 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10390
flags: 0xfff18000001042(referenced|workingset|reserved|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff18000001042 ffffea000040e408 ffffea000040e408 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:1010!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5098 Comm: syz-executor383 Tainted: G B 6.5.0-rc1-syzkaller-00259-g831fe284d827 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
RIP: 0010:put_page_testzero include/linux/mm.h:1010 [inline]
RIP: 0010:folio_put_testzero include/linux/mm.h:1016 [inline]
RIP: 0010:folio_put include/linux/mm.h:1422 [inline]
RIP: 0010:put_page include/linux/mm.h:1492 [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: a0 69 fd 49 8d 5e ff e9 28 fe ff ff 4c 8b 6c 24 28 e9 12 f4 ff ff e8 17 a0 69 fd 48 c7 c6 e0 a7 c7 8a 48 89 df e8 08 49 a6 fd <0f> 0b e8 a1 8d bd fd e9 ca f8 ff ff 4c 89 ef e8 b4 8d bd fd e9 2c
RSP: 0018:ffffc90003bdf898 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffea000040e400 RCX: 0000000000000000
RDX: ffff88802ca89dc0 RSI: ffffffff841cced8 RDI: 0000000000000000
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff1d56fca
R10: ffffffff8eab7e57 R11: 0000000000000001 R12: ffffea000040e434
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88807e068000
FS: 00007fcc6a7f06c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe14705888 CR3: 000000002b66e000 CR4: 0000000000350ef0
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_sendmsg+0x6ac/0x940 net/socket.c:2494
___sys_sendmsg+0x135/0x1d0 net/socket.c:2548
__sys_sendmsg+0x117/0x1e0 net/socket.c:2577
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:0x7fcc6a82f3e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 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:00007fcc6a7f0238 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fcc6a8b9328 RCX: 00007fcc6a82f3e9
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000004
RBP: 00007fcc6a8b9320 R08: 00007fcc6a7f06c0 R09: 00007fcc6a7f06c0
R10: 00007fcc6a7f06c0 R11: 0000000000000246 R12: 00007fcc6a8b932c
R13: 0000000000000000 R14: 00007ffe147057c0 R15: 00007ffe147058a8
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:put_page_testzero include/linux/mm.h:1010 [inline]
RIP: 0010:folio_put_testzero include/linux/mm.h:1016 [inline]
RIP: 0010:folio_put include/linux/mm.h:1422 [inline]
RIP: 0010:put_page include/linux/mm.h:1492 [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: a0 69 fd 49 8d 5e ff e9 28 fe ff ff 4c 8b 6c 24 28 e9 12 f4 ff ff e8 17 a0 69 fd 48 c7 c6 e0 a7 c7 8a 48 89 df e8 08 49 a6 fd <0f> 0b e8 a1 8d bd fd e9 ca f8 ff ff 4c 89 ef e8 b4 8d bd fd e9 2c
RSP: 0018:ffffc90003bdf898 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffea000040e400 RCX: 0000000000000000
RDX: ffff88802ca89dc0 RSI: ffffffff841cced8 RDI: 0000000000000000
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff1d56fca
R10: ffffffff8eab7e57 R11: 0000000000000001 R12: ffffea000040e434
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88807e068000
FS: 00007fcc6a7f06c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe14705888 CR3: 000000002b66e000 CR4: 0000000000350ef0