CVE-2022-49021: net: phy: fix null-ptr-deref while probe() failed
In the Linux kernel, the following vulnerability has been resolved:
net: phy: fix null-ptr-deref while probe() failed
I got a null-ptr-deref report as following when doing fault injection test:
BUG: kernel NULL pointer dereference, address: 0000000000000058
Oops: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 PID: 253 Comm: 507-spi-dm9051 Tainted: G B N 6.1.0-rc3+
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
RIP: 0010:klist_put+0x2d/0xd0
Call Trace:
<TASK>
klist_remove+0xf1/0x1c0
device_release_driver_internal+0x23e/0x2d0
bus_remove_device+0x1bd/0x240
device_del+0x357/0x770
phy_device_remove+0x11/0x30
mdiobus_unregister+0xa5/0x140
release_nodes+0x6a/0xa0
devres_release_all+0xf8/0x150
device_unbind_cleanup+0x19/0xd0
//probe path:
phy_device_register()
device_add()
phy_connect
phy_attach_direct() //set device driver
probe() //it's failed, driver is not bound
device_bind_driver() // probe failed, it's not called
//remove path:
phy_device_remove()
device_del()
device_release_driver_internal()
__device_release_driver() //dev->drv is not NULL
klist_remove() <- knode_driver is not added yet, cause null-ptr-deref
In phy_attach_direct(), after setting the 'dev->driver', probe() fails,
device_bind_driver() is not called, so the knode_driver->n_klist is not
set, then it causes null-ptr-deref in __device_release_driver() while
deleting device. Fix this by setting dev->driver to NULL in the error
path in phy_attach_direct().
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue can crash a system when a PHY network device probe fails in a specific driver path. It was reported from fault-injection testing, not real-world attacks. Business impact is mainly availability risk for affected Linux systems, especially embedded or networking equipment using PHY devices.
Executive priority
Handle through normal kernel patch management unless affected systems are critical network infrastructure or show related crashes. There is no source evidence of active exploitation, but unplanned kernel crashes can still affect availability.
Technical view
The bug is a NULL pointer dereference in the Linux PHY attach/remove flow. phy_attach_direct sets dev->driver before probe succeeds; if probe fails, device_bind_driver is not called, leaving knode_driver uninitialized. Later device removal can call klist_remove through __device_release_driver and dereference NULL. The fix clears dev->driver on the error path.
Likely exposure
Exposure appears limited to affected Linux kernel versions and systems exercising the PHY device attach path where probe fails. The bundle does not identify a remotely reachable attack surface, specific distributions, or affected hardware beyond Linux PHY handling.
Exploitation context
The source describes discovery during fault-injection testing. KEV is false, and the provided sources do not claim active exploitation, public exploit availability, or weaponized use. Treat it as a reliability and denial-of-service concern unless vendor guidance says otherwise.
Researcher notes
Evidence is strongest for the root cause and patch direction, but incomplete for exploitability. The CVE data has no CVSS, CWE, distribution matrix, or hardware-specific scope. Validate against exact downstream kernel backports rather than upstream version strings alone.
Mitigation direction
Apply Linux stable kernel updates containing the referenced PHY fix commits.
Check distribution or device-vendor advisories for backported kernel packages.
Prioritize Linux-based networking and embedded systems with PHY devices.
Avoid direct wrangler-style deploy assumptions; follow vendor kernel maintenance procedures.
If patch timing is constrained, monitor for PHY probe failures and kernel oops events.
Validation and detection
Inventory Linux kernel versions across servers, appliances, and embedded devices.
Compare deployed kernels against the affected versions and referenced stable commits.
Confirm package changelogs include the PHY null-pointer dereference fix.
Review kernel logs for PHY probe failures, device removal errors, or oops traces.
After updating, validate boot and network-interface initialization on representative hardware.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2022-49021 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.