{"id":"CVE-2022-50246","summary":"usb: typec: tcpci: fix of node refcount leak in tcpci_register_port()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: typec: tcpci: fix of node refcount leak in tcpci_register_port()\n\nI got the following report while doing device(mt6370-tcpc) load\ntest with CONFIG_OF_UNITTEST and CONFIG_OF_DYNAMIC enabled:\n\n  OF: ERROR: memory leak, expected refcount 1 instead of 2,\n  of_node_get()/of_node_put() unbalanced - destroy cset entry:\n  attach overlay node /i2c/pmic@34/tcpc/connector\n\nThe 'fwnode' set in tcpci_parse_config() which is called\nin tcpci_register_port(), its node refcount is increased\nin device_get_named_child_node(). It needs be put while\nexiting, so call fwnode_handle_put() in the error path of\ntcpci_register_port() and in tcpci_unregister_port() to\navoid leak.","modified":"2026-04-11T12:44:54.918842Z","published":"2025-09-15T14:02:04.841Z","related":["SUSE-SU-2025:03615-1","SUSE-SU-2025:03628-1","SUSE-SU-2025:3716-1","SUSE-SU-2025:3761-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50246.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0384e87e3fec735e47f1c133c796f32ef7a72a9b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4f257e2eba419ab4cd880c822346450e4e7b2af3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5f125507d2270035dfcf83fbff6cff5a143e200c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ba75be6f0d9d028d20852564206565a4c03e3288"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d3b6c28a71f111a6c67ddc3238aab95910fd86cf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e75a324409715bd71348f79a49aa61b69dbeb676"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50246.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50246"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5e85a04c8c0d271d7561a770b85741f186398868"},{"fixed":"4f257e2eba419ab4cd880c822346450e4e7b2af3"},{"fixed":"d3b6c28a71f111a6c67ddc3238aab95910fd86cf"},{"fixed":"ba75be6f0d9d028d20852564206565a4c03e3288"},{"fixed":"e75a324409715bd71348f79a49aa61b69dbeb676"},{"fixed":"5f125507d2270035dfcf83fbff6cff5a143e200c"},{"fixed":"0384e87e3fec735e47f1c133c796f32ef7a72a9b"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50246.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.19.0"},{"fixed":"5.4.229"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.86"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.0.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50246.json"}}],"schema_version":"1.7.5"}