BUG: Bad page state in process syz-executor327 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: 5069 Comm: syz-executor327 Not tainted 6.5.0-rc1-syzkaller-00248-gb6e6cc1f78c7 #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]
____sys_sendmsg+0x66c/0x940 net/socket.c:2491
___sys_sendmsg+0x135/0x1d0 net/socket.c:2548
__sys_sendmmsg+0x1a1/0x450 net/socket.c:2634
__do_sys_sendmmsg net/socket.c:2663 [inline]
__se_sys_sendmmsg net/socket.c:2660 [inline]
__x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2660
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:0x7f71cc899219
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 31 1b 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:00007f71cc852238 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f71cc91c328 RCX: 00007f71cc899219
RDX: 04000000000003d5 RSI: 0000000020007b40 RDI: 0000000000000004
RBP: 00007f71cc91c320 R08: 0000000000000000 R09: 00007f71cc8526c0
R10: 0000000000000000 R11: 0000000000000246 R12: 04000000000003d5
R13: 0000000000000000 R14: 00007ffd8d0544d0 R15: 00007ffd8d0545b8
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: 1 PID: 5069 Comm: syz-executor327 Tainted: G B 6.5.0-rc1-syzkaller-00248-gb6e6cc1f78c7 #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:ffffc90003c6f7c0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffea000040e400 RCX: 0000000000000000
RDX: ffff88807df48000 RSI: ffffffff841cced8 RDI: 0000000000000000
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff1d56fca
R10: ffffffff8eab7e57 R11: 1ffffffff1936249 R12: ffffea000040e434
R13: 0000000000000000 R14: 0000000000000000 R15: ffff8880791e1000
FS: 00007f71cc8526c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f71cc8e81f8 CR3: 0000000029bfb000 CR4: 0000000000350ee0
Call Trace:
hash_sendmsg+0x459/0x1030 crypto/algif_hash.c:119
sock_sendmsg_nosec net/socket.c:725 [inline]
____sys_sendmsg+0x66c/0x940 net/socket.c:2491
___sys_sendmsg+0x135/0x1d0 net/socket.c:2548
__sys_sendmmsg+0x1a1/0x450 net/socket.c:2634
__do_sys_sendmmsg net/socket.c:2663 [inline]
__se_sys_sendmmsg net/socket.c:2660 [inline]
__x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2660
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:0x7f71cc899219
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 31 1b 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:00007f71cc852238 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f71cc91c328 RCX: 00007f71cc899219
RDX: 04000000000003d5 RSI: 0000000020007b40 RDI: 0000000000000004
RBP: 00007f71cc91c320 R08: 0000000000000000 R09: 00007f71cc8526c0
R10: 0000000000000000 R11: 0000000000000246 R12: 04000000000003d5
R13: 0000000000000000 R14: 00007ffd8d0544d0 R15: 00007ffd8d0545b8
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:ffffc90003c6f7c0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffea000040e400 RCX: 0000000000000000
RDX: ffff88807df48000 RSI: ffffffff841cced8 RDI: 0000000000000000
RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff1d56fca
R10: ffffffff8eab7e57 R11: 1ffffffff1936249 R12: ffffea000040e434
R13: 0000000000000000 R14: 0000000000000000 R15: ffff8880791e1000
FS: 00007f71cc8526c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f71cc8e81f8 CR3: 0000000029bfb000 CR4: 0000000000350ee0