mlxsw: fix refcount leak in mlxsw_sp_vrs_lpm_tree_replace()
In the Linux kernel, the following vulnerability has been resolved: mlxsw: fix refcount leak in mlxsw_sp_vrs_lpm_tree_replace() When mlxsw_sp_vrs_lpm_tree_replace() fails after replacing some VRs, the error rollback loop does not correctly revert the preceding replacements. The loop decrements the index but fails to update the vr pointer, which still points to the VR that caused the failure. As a result, the condition and the rollback call always operate on the same VR, potentially calling mlxsw_sp_vr_lpm_tree_replace() multiple times on it while never rolling back the earlier VRs. Those VRs continue to hold a reference to new_tree acquired via mlxsw_sp_lpm_tree_hold(), leaking the reference count of new_tree. Fix by reinitializing vr inside the error loop with the updated index: vr = &mlxsw_sp->router->vrs[i]; so that the loop correctly iterates over all VRs that were actually replaced.
CVE-2026-72307
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:CVE-2026-72307
Kernel
Source reference: /affected/1/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 5.10.261
Source reference:
/affected/1/ranges5.15.212Source reference:
/affected/1/ranges6.1.178Source reference:
/affected/1/ranges6.6.145Source reference:
/affected/1/ranges6.12.97Source reference:
/affected/1/ranges6.18.40Source reference:
/affected/1/ranges7.1.5Source reference:
/affected/1/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "fc922bb0dd9406dd9897fd47df958789891c380e"
},
{
"fixed": "c2c75c45b54f3b12eafb28a4eb47f8821512c1aa"
},
{
"fixed": "7203ac71d3895fa5948b319dd724f0e1cffbc4a1"
},
{
"fixed": "f6454a5fbf2224ad30ec70e686a6c592561da1f2"
},
{
"fixed": "220d41bdce41fe5a39a7f419faab1e907b4093c2"
},
{
"fixed": "9e4a6185679922305ea1df68403f00ccc512656b"
},
{
"fixed": "3a2b47d1b4b3de54d030a7fdb6a322c970513ee3"
},
{
"fixed": "8adebf07b46df79a0e49a6d4ae384f0db7c91db6"
},
{
"fixed": "21cf8dc478a49e8de039c2739b1646a774cb1944"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72307.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.14.0"
},
{
"fixed": "5.10.261"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.212"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.178"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.145"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.97"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.40"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "7.1.5"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72307.json"
}
}
]- Related CVEs
- CVE-2026-72307
Source reference:
/id
Publisher severity
No explicit severity was provided.
- Event
- #50731 · Revision 1
- Added to Heist Feed
- Publisher date