In the Linux kernel, the following vulnerability has been resolved:
device property: fix of node refcount leak in fwnodegraphgetnextendpoint()
The 'parent' returned by fwnodegraphgetportparent() with refcount incremented when 'prev' is not NULL, it needs be put when finish using it.
Because the parent is const, introduce a new variable to store the returned fwnode, then put it before returning from fwnodegraphgetnextendpoint().
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@39af728649b05e88a2b40e714feeee6451c3f18e",
"id": "CVE-2022-49752-05525d5a",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "fwnode_graph_get_next_endpoint",
"file": "drivers/base/property.c"
},
"digest": {
"length": 320.0,
"function_hash": "135124960485736431552469214138199572973"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7701a4bd45c11f9a289d8f262fad05705a012339",
"id": "CVE-2022-49752-3c5c8845",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/base/property.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"221722305650371545102411106516168137632",
"200058005059641185937811186853305507168",
"317561618514708693934575096683747635273",
"216581851001671674849693318111556106568",
"307406456530364116710427214828427010346",
"99685918626805296711245714801745924396",
"53307014099742419537961810159124314586",
"49121217603048320807418785227788228228",
"172747313638221264664721460009285406199",
"38293448599533872764437481283874618004",
"133176732087451737243065207271219419054",
"177003864800278779492142828326736300046",
"237689942614978729063874386472989817702",
"333013616838004224783200530070681433998",
"52617627675550007398620270147941383237",
"313059140712762455563614716342918775849"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e75485fc589ec729cc182aa9b41dfb6c15ae6f6e",
"id": "CVE-2022-49752-60a0c48b",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "fwnode_graph_get_next_endpoint",
"file": "drivers/base/property.c"
},
"digest": {
"length": 320.0,
"function_hash": "135124960485736431552469214138199572973"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e75485fc589ec729cc182aa9b41dfb6c15ae6f6e",
"id": "CVE-2022-49752-bc89f720",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/base/property.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"221722305650371545102411106516168137632",
"200058005059641185937811186853305507168",
"317561618514708693934575096683747635273",
"216581851001671674849693318111556106568",
"307406456530364116710427214828427010346",
"99685918626805296711245714801745924396",
"53307014099742419537961810159124314586",
"49121217603048320807418785227788228228",
"172747313638221264664721460009285406199",
"38293448599533872764437481283874618004",
"133176732087451737243065207271219419054",
"177003864800278779492142828326736300046",
"237689942614978729063874386472989817702",
"333013616838004224783200530070681433998",
"52617627675550007398620270147941383237",
"313059140712762455563614716342918775849"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@39af728649b05e88a2b40e714feeee6451c3f18e",
"id": "CVE-2022-49752-be464194",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "drivers/base/property.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"221722305650371545102411106516168137632",
"200058005059641185937811186853305507168",
"317561618514708693934575096683747635273",
"216581851001671674849693318111556106568",
"307406456530364116710427214828427010346",
"99685918626805296711245714801745924396",
"53307014099742419537961810159124314586",
"49121217603048320807418785227788228228",
"172747313638221264664721460009285406199",
"38293448599533872764437481283874618004",
"133176732087451737243065207271219419054",
"177003864800278779492142828326736300046",
"237689942614978729063874386472989817702",
"333013616838004224783200530070681433998",
"52617627675550007398620270147941383237",
"313059140712762455563614716342918775849"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7701a4bd45c11f9a289d8f262fad05705a012339",
"id": "CVE-2022-49752-cfdc50c8",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "fwnode_graph_get_next_endpoint",
"file": "drivers/base/property.c"
},
"digest": {
"length": 320.0,
"function_hash": "135124960485736431552469214138199572973"
},
"signature_type": "Function"
}
]