{"id":"CVE-2022-50561","summary":"iio: fix memory leak in iio_device_register_eventset()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\niio: fix memory leak in iio_device_register_eventset()\n\nWhen iio_device_register_sysfs_group() returns failed,\niio_device_register_eventset() needs to free attrs array.\n\nOtherwise, kmemleak would scan & report memory leak as below:\n\nunreferenced object 0xffff88810a1cc3c0 (size 32):\n  comm \"100-i2c-vcnl302\", pid 728, jiffies 4295052307 (age 156.027s)\n  backtrace:\n    __kmalloc+0x46/0x1b0\n    iio_device_register_eventset at drivers/iio/industrialio-event.c:541\n    __iio_device_register at drivers/iio/industrialio-core.c:1959\n    __devm_iio_device_register at drivers/iio/industrialio-core.c:2040","modified":"2026-04-02T08:28:37.909769Z","published":"2025-10-22T13:23:20.802Z","related":["SUSE-SU-2025:4111-1","SUSE-SU-2025:4139-1","SUSE-SU-2025:4149-1","SUSE-SU-2025:4320-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50561.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/5de3add7509c95685f1185683b817dd206c4b1f1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/86fdd15e10e404e70ecb2a3bff24d70356d42b36"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a154b1c139fbf6a49762159be81d425d41ceec87"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dc6afd6070f3a5b086c8c5cfa6ded63ae44494da"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50561.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50561"},{"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":"32f171724e5cbecc80594fb6eced057cfdd6eb6f"},{"fixed":"dc6afd6070f3a5b086c8c5cfa6ded63ae44494da"},{"fixed":"5de3add7509c95685f1185683b817dd206c4b1f1"},{"fixed":"a154b1c139fbf6a49762159be81d425d41ceec87"},{"fixed":"86fdd15e10e404e70ecb2a3bff24d70356d42b36"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50561.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.13.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/cve-osv-conversion/osv-output/CVE-2022-50561.json"}}],"schema_version":"1.7.5"}