syzbot
general protection fault in nsim_bus_dev_numvfs_store
Status:
upstream: reported on 2026/07/28 06:32
Reported-by: syzbot+5a7d7ff6b97ba6c413e7@syzkaller.appspotmail.com
First crash: 22d, last: 17d
Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000045: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000228-0x000000000000022f]
CPU: 0 PID: 4436 Comm: syz.1.30 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:nsim_esw_mode_is_switchdev drivers/net/netdevsim/netdevsim.h:278 [inline]
RIP: 0010:nsim_bus_dev_vfs_enable drivers/net/netdevsim/bus.c:41 [inline]
RIP: 0010:nsim_bus_dev_numvfs_store+0x2a5/0x480 drivers/net/netdevsim/bus.c:81
Code: 80 3c 30 00 74 08 4c 89 e7 e8 e7 f0 ed fb 4d 8b 2c 24 4d 8d b5 28 02 00 00 4c 89 f0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 8d 01 00 00 45 0f b7 36 bf 01 00 00 00 44
RSP: 0018:ffffc9000351fbc0 EFLAGS: 00010202
RAX: 0000000000000045 RBX: ffff8880782a2558 RCX: dffffc0000000000
RDX: 0000000000000002 RSI: 0000000000000001 RDI: 0000000000000004
RBP: ffffc9000351fc68 R08: ffffc9000351f987 R09: 1ffff920006a3f30
R10: dffffc0000000000 R11: fffff520006a3f31 R12: ffff8880782a2078
R13: 0000000000000000 R14: 0000000000000228 R15: 1ffff1100f0544ab
FS: 00007fd32771c6c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b32816ff8 CR3: 00000000230f6000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296
call_write_iter include/linux/fs.h:2173 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x748/0xd70 fs/read_write.c:594
ksys_write+0x153/0x260 fs/read_write.c:647
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fd329506019
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd32771c028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fd32978e180 RCX: 00007fd329506019
RDX: 0000000000000002 RSI: 0000200000000600 RDI: 0000000000000008
RBP: 00007fd32959d00c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd32978e218 R14: 00007fd32978e180 R15: 00007ffe43dc0e18
</TASK>
Modules linked in:
---[ end trace a2ed044185666ad3 ]---
RIP: 0010:nsim_esw_mode_is_switchdev drivers/net/netdevsim/netdevsim.h:278 [inline]
RIP: 0010:nsim_bus_dev_vfs_enable drivers/net/netdevsim/bus.c:41 [inline]
RIP: 0010:nsim_bus_dev_numvfs_store+0x2a5/0x480 drivers/net/netdevsim/bus.c:81
Code: 80 3c 30 00 74 08 4c 89 e7 e8 e7 f0 ed fb 4d 8b 2c 24 4d 8d b5 28 02 00 00 4c 89 f0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 8d 01 00 00 45 0f b7 36 bf 01 00 00 00 44
RSP: 0018:ffffc9000351fbc0 EFLAGS: 00010202
RAX: 0000000000000045 RBX: ffff8880782a2558 RCX: dffffc0000000000
RDX: 0000000000000002 RSI: 0000000000000001 RDI: 0000000000000004
RBP: ffffc9000351fc68 R08: ffffc9000351f987 R09: 1ffff920006a3f30
R10: dffffc0000000000 R11: fffff520006a3f31 R12: ffff8880782a2078
R13: 0000000000000000 R14: 0000000000000228 R15: 1ffff1100f0544ab
FS: 00007fd32771c6c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6cffd402f8 CR3: 00000000230f6000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 80 3c 30 00 cmpb $0x0,(%rax,%rsi,1)
4: 74 08 je 0xe
6: 4c 89 e7 mov %r12,%rdi
9: e8 e7 f0 ed fb call 0xfbedf0f5
e: 4d 8b 2c 24 mov (%r12),%r13
12: 4d 8d b5 28 02 00 00 lea 0x228(%r13),%r14
19: 4c 89 f0 mov %r14,%rax
1c: 48 c1 e8 03 shr $0x3,%rax
20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
27: fc ff df
* 2a: 0f b6 04 08 movzbl (%rax,%rcx,1),%eax <-- trapping instruction
2e: 84 c0 test %al,%al
30: 0f 85 8d 01 00 00 jne 0x1c3
36: 45 0f b7 36 movzwl (%r14),%r14d
3a: bf 01 00 00 00 mov $0x1,%edi
3f: 44 rex.R
* Struck through repros no longer work on HEAD.