BUG: Bad page state in process syz-executor275 pfn:103b0
page:ffffea000040ec00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103b0
flags: 0xfff18000001042(referenced|workingset|reserved|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff18000001042 ffffea000040ec08 ffffea000040ec08 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: 5112 Comm: syz-executor275 Not tainted 6.5.0-rc1-syzkaller-00006-g3f01e9fed845 #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+0x136/0x150 lib/dump_stack.c:106
bad_page+0x71/0x1a0 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+0x6ff/0xcb0 mm/page_alloc.c:2348
free_unref_page+0x33/0x370 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+0x15a7/0x1960 lib/scatterlist.c:1339
hash_sendmsg+0x523/0x1100 crypto/algif_hash.c:119
sock_sendmsg_nosec net/socket.c:725 [inline]
sock_sendmsg+0xde/0x190 net/socket.c:748
____sys_sendmsg+0x739/0x920 net/socket.c:2494
___sys_sendmsg+0x110/0x1b0 net/socket.c:2548
__sys_sendmsg+0xf7/0x1c0 net/socket.c:2577
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff4acbd23e9
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:00007ff4acb93238 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007ff4acc5c328 RCX: 00007ff4acbd23e9
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000004
RBP: 00007ff4acc5c320 R08: 00007ff4acb936c0 R09: 00007ff4acb936c0
R10: 00007ff4acb936c0 R11: 0000000000000246 R12: 00007ff4acc5c32c
R13: 0000000000000000 R14: 00007fff6be3d410 R15: 00007fff6be3d4f8
page:ffffea000040ec00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103b0
flags: 0xfff18000001042(referenced|workingset|reserved|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff18000001042 ffffea000040ec08 ffffea000040ec08 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: 5112 Comm: syz-executor275 Tainted: G B 6.5.0-rc1-syzkaller-00006-g3f01e9fed845 #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+0x16f0/0x1960 lib/scatterlist.c:1339
Code: 6e ff e9 48 fe ff ff 48 8b 44 24 60 48 89 44 24 18 e9 41 f4 ff ff e8 df 6e 70 fd 48 c7 c6 a0 42 c7 8a 48 89 ef e8 c0 b0 ac fd <0f> 0b e8 59 a4 c3 fd e9 9e f9 ff ff e8 6f a4 c3 fd e9 a9 f0 ff ff
RSP: 0018:ffffc90003bcf8b8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: ffff888076b55940 RSI: ffffffff841472f0 RDI: ffffffff8c37aa00
RBP: ffffea000040ec00 R08: 0000000000000000 R09: fffffbfff1d54dda
R10: ffffffff8eaa6ed7 R11: 0000000000000001 R12: ffff888028528000
R13: ffffea000040ec34 R14: 0000000000000000 R15: 0000000000000000
FS: 00007ff4acb936c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff6be3d4d8 CR3: 0000000021283000 CR4: 0000000000350ef0
Call Trace:
hash_sendmsg+0x523/0x1100 crypto/algif_hash.c:119
sock_sendmsg_nosec net/socket.c:725 [inline]
sock_sendmsg+0xde/0x190 net/socket.c:748
____sys_sendmsg+0x739/0x920 net/socket.c:2494
___sys_sendmsg+0x110/0x1b0 net/socket.c:2548
__sys_sendmsg+0xf7/0x1c0 net/socket.c:2577
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff4acbd23e9
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:00007ff4acb93238 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007ff4acc5c328 RCX: 00007ff4acbd23e9
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000004
RBP: 00007ff4acc5c320 R08: 00007ff4acb936c0 R09: 00007ff4acb936c0
R10: 00007ff4acb936c0 R11: 0000000000000246 R12: 00007ff4acc5c32c
R13: 0000000000000000 R14: 00007fff6be3d410 R15: 00007fff6be3d4f8
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+0x16f0/0x1960 lib/scatterlist.c:1339
Code: 6e ff e9 48 fe ff ff 48 8b 44 24 60 48 89 44 24 18 e9 41 f4 ff ff e8 df 6e 70 fd 48 c7 c6 a0 42 c7 8a 48 89 ef e8 c0 b0 ac fd <0f> 0b e8 59 a4 c3 fd e9 9e f9 ff ff e8 6f a4 c3 fd e9 a9 f0 ff ff
RSP: 0018:ffffc90003bcf8b8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: ffff888076b55940 RSI: ffffffff841472f0 RDI: ffffffff8c37aa00
RBP: ffffea000040ec00 R08: 0000000000000000 R09: fffffbfff1d54dda
R10: ffffffff8eaa6ed7 R11: 0000000000000001 R12: ffff888028528000
R13: ffffea000040ec34 R14: 0000000000000000 R15: 0000000000000000
FS: 00007ff4acb936c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff6be3d4d8 CR3: 0000000021283000 CR4: 0000000000350ef0