Skip to contentSkip to conversation

WARNING in __vmap_pages_range_noflush

syzbot syzbot 2 participants 7 messages Aug 8, 2025 io_uring

lore
Share & tools
lore

syzbot

author syzbot
#0 lore raw

Hello,

syzbot found the following issue on:

HEAD commit:    6e64f4580381 Merge tag 'input-for-v6.17-rc0' of git://git...
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=166ceea2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=5549e3e577d8650d
dashboard link: https://syzkaller.appspot.com/bug?extid=23727438116feb13df15
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10202ea2580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=140a9042580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/00c0275acc38/disk-6e64f458.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/aaa587e79838/vmlinux-6e64f458.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b6b49690ca26/bzImage-6e64f458.xz

The issue was bisected to:

commit 087f997870a948820ec366701d178f402c6a23a3

Author: Pavel Begunkov <[email protected]>
Date:   Fri Nov 29 13:34:32 2024 +0000

io_uring/memmap: implement mmap for regions

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=169795bc580000
final oops:     https://syzkaller.appspot.com/x/report.txt?x=159795bc580000
console output: https://syzkaller.appspot.com/x/log.txt?x=119795bc580000

IMPORTANT: if you fix the issue, please add the following tag to the commit:

Reported-by [email protected]
Fixes 087f997870a9 ("io_uring/memmap: implement mmap for regions")
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5840 at mm/vmalloc.c:542 vmap_pages_pte_range mm/vmalloc.c:542 [inline]
WARNING: CPU: 1 PID: 5840 at mm/vmalloc.c:542 vmap_pages_pmd_range mm/vmalloc.c:569 [inline]
WARNING: CPU: 1 PID: 5840 at mm/vmalloc.c:542 vmap_pages_pud_range mm/vmalloc.c:587 [inline]
WARNING: CPU: 1 PID: 5840 at mm/vmalloc.c:542 vmap_pages_p4d_range mm/vmalloc.c:605 [inline]
WARNING: CPU: 1 PID: 5840 at mm/vmalloc.c:542 vmap_small_pages_range_noflush mm/vmalloc.c:627 [inline]
WARNING: CPU: 1 PID: 5840 at mm/vmalloc.c:542 __vmap_pages_range_noflush+0xd4e/0xe10 mm/vmalloc.c:656
Modules linked in:
CPU: 1 UID: 0 PID: 5840 Comm: syz-executor304 Tainted: G        W           6.16.0-syzkaller-11952-g6e64f4580381 #0 PREEMPT_{RT,(full)} 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:vmap_pages_pte_range mm/vmalloc.c:542 [inline]
RIP: 0010:vmap_pages_pmd_range mm/vmalloc.c:569 [inline]
RIP: 0010:vmap_pages_pud_range mm/vmalloc.c:587 [inline]
RIP: 0010:vmap_pages_p4d_range mm/vmalloc.c:605 [inline]
RIP: 0010:vmap_small_pages_range_noflush mm/vmalloc.c:627 [inline]
RIP: 0010:__vmap_pages_range_noflush+0xd4e/0xe10 mm/vmalloc.c:656
Code: b1 ff eb 2f e8 53 5f b1 ff 45 31 e4 eb 25 e8 49 5f b1 ff 90 0f 0b 90 eb 14 e8 3e 5f b1 ff 90 0f 0b 90 eb 09 e8 33 5f b1 ff 90 <0f> 0b 90 41 bc f4 ff ff ff 44 89 e0 48 81 c4 e0 00 00 00 5b 41 5c
RSP: 0018:ffffc900049878d8 EFLAGS: 00010293
RAX: ffffffff820cfc2d RBX: ffff8880642b60c8 RCX: ffff8880331c8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffea0003000000 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffffbfff1e3a007 R12: ffffc9008be1a000
R13: 1ffff1100c856c19 R14: 0000000000000000 R15: dffffc0000000000
FS:  000055557fb73380(0000) GS:ffff8881269cb000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005641a237d168 CR3: 000000004069e000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 vmap_pages_range_noflush mm/vmalloc.c:681 [inline]
 vmap_pages_range mm/vmalloc.c:701 [inline]
 vmap+0x1ca/0x310 mm/vmalloc.c:3515
 io_region_init_ptr+0x24d/0x350 io_uring/memmap.c:125
 io_create_region+0x3a4/0x480 io_uring/memmap.c:228
 io_create_region_mmap_safe+0xc0/0x180 io_uring/memmap.c:245
 io_register_mem_region+0x27a/0x3c0 io_uring/register.c:616
 __io_uring_register io_uring/register.c:836 [inline]
 __do_sys_io_uring_register io_uring/register.c:929 [inline]
 __se_sys_io_uring_register+0x3b4/0x1130 io_uring/register.c:906
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f59fe9b6b39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffffb26e418 EFLAGS: 00000246 ORIG_RAX: 00000000000001ab
RAX: ffffffffffffffda RBX: 0000000000000045 RCX: 00007f59fe9b6b39
RDX: 0000200000000200 RSI: 0000000000000022 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000010000000 R09: 0000000000000006
R10: 0000000000000001 R11: 0000000000000246 R12: 0000200000000300
R13: 0000200000000100 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

---
This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at [email protected].

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

maintainer
#1 lore raw
Quoted 4 lines · syzbot

Hello,

syzbot found the following issue on:

Quoted 8 lines
HEAD commit:    6e64f4580381 Merge tag 'input-for-v6.17-rc0' of git://git...
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=166ceea2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=5549e3e577d8650d
dashboard link: https://syzkaller.appspot.com/bug?extid=23727438116feb13df15
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10202ea2580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=140a9042580000

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git>

io_uring/memmap.c +1 -1
index 725dc0bec24c..2e99dffddfc5 100644
@@ -156,7 +156,7 @@ static int io_region_allocate_pages(struct io_ring_ctx *ctx,
 				    unsigned long mmap_offset)
 {
 	gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN;
-	unsigned long size = mr->nr_pages << PAGE_SHIFT;
+	size_t size = (size_t) mr->nr_pages << PAGE_SHIFT;
 	unsigned long nr_allocated;
 	struct page **pages;
 	void *p;
Signature · 1 line
Jens Axboe
author syzbot
#2 lore raw
want either no args or 2 args (repo, branch), got 5
Quoted 14 lines · syzbot
Quoted 4 lines

Hello,

syzbot found the following issue on:

Quoted 8 lines
HEAD commit:    6e64f4580381 Merge tag 'input-for-v6.17-rc0' of git://git...
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=166ceea2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=5549e3e577d8650d
dashboard link: https://syzkaller.appspot.com/bug?extid=23727438116feb13df15
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10202ea2580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=140a9042580000
Quoted 1 line

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git>

want either no args or 2 args (repo, branch), got 5

Quoted 17 lines
io_uring/memmap.c +1 -1
index 725dc0bec24c..2e99dffddfc5 100644
@@ -156,7 +156,7 @@ static int io_region_allocate_pages(struct io_ring_ctx *ctx,
 				    unsigned long mmap_offset)
 {
 	gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN;
-	unsigned long size = mr->nr_pages << PAGE_SHIFT;
+	size_t size = (size_t) mr->nr_pages << PAGE_SHIFT;
 	unsigned long nr_allocated;
 	struct page **pages;
 	void *p;
Signature · 2 lines
-- 
Jens Axboe
maintainer
#3 lore raw
Quoted 14 lines · syzbot
Quoted 14 lines · syzbot
Quoted 12 lines

Hello,

syzbot found the following issue on:

HEAD commit:    6e64f4580381 Merge tag 'input-for-v6.17-rc0' of git://git...
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=166ceea2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=5549e3e577d8650d
dashboard link: https://syzkaller.appspot.com/bug?extid=23727438116feb13df15
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10202ea2580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=140a9042580000
Quoted 3 lines
Quoted 1 line

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git>

want either no args or 2 args (repo, branch), got 5

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

io_uring/memmap.c +1 -1
index 725dc0bec24c..2e99dffddfc5 100644
@@ -156,7 +156,7 @@ static int io_region_allocate_pages(struct io_ring_ctx *ctx,
 				    unsigned long mmap_offset)
 {
 	gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN;
-	unsigned long size = mr->nr_pages << PAGE_SHIFT;
+	size_t size = (size_t) mr->nr_pages << PAGE_SHIFT;
 	unsigned long nr_allocated;
 	struct page **pages;
 	void *p;
Signature · 1 line
Jens Axboe
author syzbot
#4 lore raw
want either no args or 2 args (repo, branch), got 5
Quoted 15 lines · syzbot
Quoted 14 lines
Quoted 14 lines · syzbot
Quoted 12 lines

Hello,

syzbot found the following issue on:

HEAD commit:    6e64f4580381 Merge tag 'input-for-v6.17-rc0' of git://git...
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=166ceea2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=5549e3e577d8650d
dashboard link: https://syzkaller.appspot.com/bug?extid=23727438116feb13df15
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10202ea2580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=140a9042580000
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git>

want either no args or 2 args (repo, branch), got 5

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

want either no args or 2 args (repo, branch), got 5

Quoted 18 lines
io_uring/memmap.c +1 -1
index 725dc0bec24c..2e99dffddfc5 100644
@@ -156,7 +156,7 @@ static int io_region_allocate_pages(struct io_ring_ctx *ctx,
 				    unsigned long mmap_offset)
 {
 	gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN;
-	unsigned long size = mr->nr_pages << PAGE_SHIFT;
+	size_t size = (size_t) mr->nr_pages << PAGE_SHIFT;
 	unsigned long nr_allocated;
 	struct page **pages;
 	void *p;
Signature · 2 lines
-- 
Jens Axboe
maintainer
#5 lore raw
Quoted 15 lines · syzbot
Quoted 15 lines · syzbot
Quoted 14 lines
Quoted 14 lines · syzbot
Quoted 12 lines

Hello,

syzbot found the following issue on:

HEAD commit:    6e64f4580381 Merge tag 'input-for-v6.17-rc0' of git://git...
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=166ceea2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=5549e3e577d8650d
dashboard link: https://syzkaller.appspot.com/bug?extid=23727438116feb13df15
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10202ea2580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=140a9042580000
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git>

want either no args or 2 args (repo, branch), got 5

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

want either no args or 2 args (repo, branch), got 5

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

io_uring/memmap.c +1 -1
index 725dc0bec24c..2e99dffddfc5 100644
@@ -156,7 +156,7 @@ static int io_region_allocate_pages(struct io_ring_ctx *ctx,
 				    unsigned long mmap_offset)
 {
 	gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN;
-	unsigned long size = mr->nr_pages << PAGE_SHIFT;
+	size_t size = (size_t) mr->nr_pages << PAGE_SHIFT;
 	unsigned long nr_allocated;
 	struct page **pages;
 	void *p;
Signature · 1 line
Jens Axboe
author syzbot Tested-by
#6 lore raw
syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Tested on:

commit:         37816488 Merge tag 'net-6.17-rc1' of git://git.kernel...
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17ca61a2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=251464a47fe663c3
dashboard link: https://syzkaller.appspot.com/bug?extid=23727438116feb13df15
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
patch:          https://syzkaller.appspot.com/x/patch.diff?x=16e13ea2580000

Note: testing is done by a robot and is best-effort only.