[syzbot] [net?] BUG: unable to handle kernel paging request in nsim_drv_port_add (2)

Started by syzbot on Nov 1, 2026 · 2 messages from 2 authors · Last reply Nov 1, 2026

open the first message on its own page

Message details and related content
Hello,

syzbot found the following issue on:

HEAD commit:    36aad21d50d1 Merge tag 'ksmbd-for-7.4-rc1-part2' of git://..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1332b159580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=dc4462df6d1062fe
dashboard link: https://syzkaller.appspot.com/bug?extid=b3fca27eb4005f0111f4
compiler:       Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1194b795580000

AI-generated root cause summary:
In netdevsim, sysfs device attributes such as 'new_port' and 'del_port' are
exposed at the device level on nsim_bus_dev without holding device_lock or
checking if the driver is bound. An access via sysfs after the driver has been
unbound, after a failed probe, or concurrently with device removal finds drvdata
set to NULL; passing this NULL pointer to priv_to_devlink() computes a negative
offset from NULL, triggering a kernel page fault crash when attempting to
acquire devlink->lock.

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=b3fca27eb4005f0111f4

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: <redacted>

BUG: unable to handle page fault for address: fffffffffffffeb0
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD f1b3067 P4D f1b3067 PUD f1b5067 PMD 0 
Oops: Oops: 0000 [#1] SMP KASAN PTI
CPU: 0 UID: 0 PID: 6031 Comm: syz-executor405 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
RIP: 0010:__lock_acquire+0x41/0x2de0 kernel/locking/lockdep.c:5140
Code: 2d 12 48 89 84 24 e0 00 00 00 65 48 8b 05 0f e3 2d 12 48 89 44 24 08 45 31 f6 83 3d 28 dc 32 0f 00 0f 84 90 14 00 00 48 89 fb <48> 8b 07 48 3d a0 69 92 94 0f 84 7e 14 00 00 45 89 cd 89 cd 41 89
RSP: 0018:ffffc900046978d8 EFLAGS: 00010002
RAX: ffff88801ff11f40 RBX: fffffffffffffeb0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: fffffffffffffeb0
RBP: ffff88801ff11f40 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000007 R12: fffffffffffffeb0

86 more lines

Message details and related content
On 11/1/26 3:01 PM, syzbot wrote:
Hello,

syzbot found the following issue on:

HEAD commit:    36aad21d50d1 Merge tag 'ksmbd-for-7.4-rc1-part2' of git://..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1332b159580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=dc4462df6d1062fe
dashboard link: https://syzkaller.appspot.com/bug?extid=b3fca27eb4005f0111f4
compiler:       Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1194b795580000

AI-generated root cause summary:
In netdevsim, sysfs device attributes such as 'new_port' and 'del_port' are
exposed at the device level on nsim_bus_dev without holding device_lock or
checking if the driver is bound. An access via sysfs after the driver has been
unbound, after a failed probe, or concurrently with device removal finds drvdata
set to NULL; passing this NULL pointer to priv_to_devlink() computes a negative
offset from NULL, triggering a kernel page fault crash when attempting to
acquire devlink->lock.

full analysis:  https://syzkaller.appspot.com/x/ai_root_cause?x=b3fca27eb4005f0111f4

This looks like the same issue Jiacheng's pending patch addresses,

new_port/del_port don't take device_lock nor check drvdata, so a write
after unbind hits a NULL nsim_dev:

https://lore.kernel.org/netdev/20261012135941.78329-1-stitch@zju.edu.cn/

Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help