In the Linux kernel, the following vulnerability has been resolved:
net: phy: clear phydev->devlink when the link is deleted
There is a potential crash issue when disabling and re-enabling the network port. When disabling the network port, phydetach() calls devicelinkdel() to remove the device link, but it does not clear phydev->devlink, so phydev->devlink is not a NULL pointer. Then the network port is re-enabled, but if phyattachdirect() fails before calling devicelinkadd(), the code jumps to the "error" label and calls phydetach(). Since phydev->devlink retains the old value from the previous attach/detach cycle, devicelinkdel() uses the old value, which accesses a NULL pointer and causes a crash. The simplified crash log is as follows.
[ 24.702421] Call trace: [ 24.704856] devicelinkputkref+0x20/0x120 [ 24.709124] devicelinkdel+0x30/0x48 [ 24.712864] phydetach+0x24/0x168 [ 24.716261] phyattachdirect+0x168/0x3a4 [ 24.720352] phylinkfwnodephyconnect+0xc8/0x14c [ 24.725140] phylinkofphyconnect+0x1c/0x34
Therefore, phydev->devlink needs to be cleared when the device link is deleted.
[
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0795b05a59b1371b18ffbf09d385296b12e9f5d5",
"id": "CVE-2025-38149-2fcd9bb7",
"digest": {
"function_hash": "41184935385523338133506102247773819017",
"length": 1167.0
},
"target": {
"function": "phy_detach",
"file": "drivers/net/phy/phy_device.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@363fdf2777423ad346d781f09548cca14877f729",
"id": "CVE-2025-38149-415bb32c",
"digest": {
"function_hash": "107691690081012089657478851297775593100",
"length": 991.0
},
"target": {
"function": "phy_detach",
"file": "drivers/net/phy/phy_device.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ddc654e89ace723b78c34911c65243accbc9b75c",
"id": "CVE-2025-38149-878b88a6",
"digest": {
"threshold": 0.9,
"line_hashes": [
"206290309524835746854512572148661072638",
"339554857702093977677595550276163989517",
"58500435448095213588232761298546402788",
"290932292285073598910739650801495861365",
"10027520929316782148643333278732002109"
]
},
"target": {
"file": "drivers/net/phy/phy_device.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@034bc4a2a72dea2cfcaf24c6bae03c38ad5a0b87",
"id": "CVE-2025-38149-94b1994f",
"digest": {
"function_hash": "41184935385523338133506102247773819017",
"length": 1167.0
},
"target": {
"function": "phy_detach",
"file": "drivers/net/phy/phy_device.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@363fdf2777423ad346d781f09548cca14877f729",
"id": "CVE-2025-38149-bbd788a6",
"digest": {
"threshold": 0.9,
"line_hashes": [
"206290309524835746854512572148661072638",
"339554857702093977677595550276163989517",
"58500435448095213588232761298546402788",
"290932292285073598910739650801495861365",
"10027520929316782148643333278732002109"
]
},
"target": {
"file": "drivers/net/phy/phy_device.c"
}
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ddc654e89ace723b78c34911c65243accbc9b75c",
"id": "CVE-2025-38149-c2254378",
"digest": {
"function_hash": "312579510071577982462141742469346143550",
"length": 1018.0
},
"target": {
"function": "phy_detach",
"file": "drivers/net/phy/phy_device.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0795b05a59b1371b18ffbf09d385296b12e9f5d5",
"id": "CVE-2025-38149-d8156c2f",
"digest": {
"threshold": 0.9,
"line_hashes": [
"206290309524835746854512572148661072638",
"339554857702093977677595550276163989517",
"58500435448095213588232761298546402788",
"290932292285073598910739650801495861365",
"10027520929316782148643333278732002109"
]
},
"target": {
"file": "drivers/net/phy/phy_device.c"
}
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@034bc4a2a72dea2cfcaf24c6bae03c38ad5a0b87",
"id": "CVE-2025-38149-e4439ebc",
"digest": {
"threshold": 0.9,
"line_hashes": [
"206290309524835746854512572148661072638",
"339554857702093977677595550276163989517",
"58500435448095213588232761298546402788",
"290932292285073598910739650801495861365",
"10027520929316782148643333278732002109"
]
},
"target": {
"file": "drivers/net/phy/phy_device.c"
}
}
]