CVE-2026-139220: net: hibmcge: set netdev_ops before hbg_init() to fix NULL pointer dereference
In the Linux kernel, the following vulnerability has been resolved:
net: hibmcge: set netdevops before hbginit() to fix NULL pointer dereference
The driver assigns netdevops after hbginit(), but hbginit() calls hbgmdioinit() -> hbgphyconnect() -> phyconnectdirect() -> phyattachdirect() -> phylinktopoaddphy(), which invokes netdevneedopslock(). With CONFIGNETSHAPER enabled, this function dereferences dev->netdevops->netshaperops. Since netdevops is still NULL at this point, a NULL pointer dereference occurs.
Move the netdevops assignment before hbginit() so that netdevneedopslock() can safely access netdevops during PHY attachment.
The issue was hit and verified on an evaluation board.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the Linux kernel hibmcge driver, assign netdev_ops before calling hbg_init() so PHY attachment can safely access netdev_ops.