Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D026026ED20 for ; Wed, 22 Oct 2025 13:25:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761139527; cv=none; b=mv/K4x8ALK6/qrplAoGfG7LBFVG3Vkk/byZRJkKpmWSvcCBhmYRu/FDmNBjNa8KGXqGcSfYhUdEwDGyO/C17am4w87AESfJIYxxPbAngkpbbelQg+uRrWR8C6573TRnTok/pkJ05WMtb/9+2GSmbqKPRD0sgKjMJRs9RUrGGImw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761139527; c=relaxed/simple; bh=BESsd+IWXfXjpVAXR78qsWjOpdBqQ/W8OY6q2IMfvQU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fXr55F15D62Ig5MKQJCToi3bF9Kq39pDKAQMHQDa060GZBvecSX/0Hat12B33e65xvl5WzzL5HZVP/Caor8bAKun1MQnPOL6cEBC58In2s0I5hCczbaivoisugLIWVBb+W9KGTdDE9OHJHy8tAwWe/rLSl4bBQnxkTxIEWhU+G4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IuRawbkI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IuRawbkI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10AC2C4CEF5; Wed, 22 Oct 2025 13:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761139527; bh=BESsd+IWXfXjpVAXR78qsWjOpdBqQ/W8OY6q2IMfvQU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=IuRawbkIeIbj/fm0NCcZjfmOVv4CERDxr3e8x1S5M4WOhR+mw/rK2TeaZfcLzHOrC YjlskagoaOidNXXvsp/6UmsJrwdyKHe0V8lYVjQEpuWJVNgkgVIANOrFDs7W7nbbT6 qQc0KOVx6SZGWI4Z+aiQskWzPhfw8Yx49cYqgsCA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50561: iio: fix memory leak in iio_device_register_eventset() Date: Wed, 22 Oct 2025 15:24:09 +0200 Message-ID: <2025102206-CVE-2022-50561-3b76@gregkh> X-Mailer: git-send-email 2.51.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2779; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=K+5n6S/VOWiZoK9thJPqeJfats+cCWAanMBw3l2Nl9k=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk/bn2L+yKxrW3bY4cak171tmW3Wl1++C++8v3fe9szP 3e//7EhvSOGhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmsrGVYX7wNcaOjIl/zOtu zDhzaurMgITDc6IZZsxOvV0a08aczHzybnin3uQtzf1zAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: iio: fix memory leak in iio_device_register_eventset() When iio_device_register_sysfs_group() returns failed, iio_device_register_eventset() needs to free attrs array. Otherwise, kmemleak would scan & report memory leak as below: unreferenced object 0xffff88810a1cc3c0 (size 32): comm "100-i2c-vcnl302", pid 728, jiffies 4295052307 (age 156.027s) backtrace: __kmalloc+0x46/0x1b0 iio_device_register_eventset at drivers/iio/industrialio-event.c:541 __iio_device_register at drivers/iio/industrialio-core.c:1959 __devm_iio_device_register at drivers/iio/industrialio-core.c:2040 The Linux kernel CVE team has assigned CVE-2022-50561 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 32f171724e5cbecc80594fb6eced057cfdd6eb6f and fixed in 5.15.86 with commit dc6afd6070f3a5b086c8c5cfa6ded63ae44494da Issue introduced in 5.13 with commit 32f171724e5cbecc80594fb6eced057cfdd6eb6f and fixed in 6.0.16 with commit 5de3add7509c95685f1185683b817dd206c4b1f1 Issue introduced in 5.13 with commit 32f171724e5cbecc80594fb6eced057cfdd6eb6f and fixed in 6.1.2 with commit a154b1c139fbf6a49762159be81d425d41ceec87 Issue introduced in 5.13 with commit 32f171724e5cbecc80594fb6eced057cfdd6eb6f and fixed in 6.2 with commit 86fdd15e10e404e70ecb2a3bff24d70356d42b36 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2022-50561 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/iio/industrialio-event.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/dc6afd6070f3a5b086c8c5cfa6ded63ae44494da https://git.kernel.org/stable/c/5de3add7509c95685f1185683b817dd206c4b1f1 https://git.kernel.org/stable/c/a154b1c139fbf6a49762159be81d425d41ceec87 https://git.kernel.org/stable/c/86fdd15e10e404e70ecb2a3bff24d70356d42b36