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 892067EEF8 for ; Tue, 21 May 2024 15:04:40 +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=1716303880; cv=none; b=BuyDo9D89Ge6Dz6drdOmBrGQYcPu8G/5Zb2C9hRUy5zdVoeUQ9cQLUHG0ibSLTWEmv6MSuihiO4EkxA4+40ZxvTV5lReNzpILvY20OPC+WHiy/vdpRowfd00X+ETEUb4KRHN0gWbJwCgryPBqESePv9Kk4rJXBQ0Eclze+X0Zmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716303880; c=relaxed/simple; bh=xnvmbiGr8SLFugm20oHHyP0+oa+NJ7wI9t8mfkVHEs4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UAaFmLezE/GjfNY+7gwdSr9Hizj6XZJlrAvGhvZWgem5WyOCdMrs3J2nGJTaTIRfHVmYSTXyk1YUbRvuwhQK3ELbdQYIgEZwcSCAEllKYb9hGguoX4u2aSh/m+wuqgtlb+3awRMzm1+pn/cD43bUw/RZ+aCtcBrAst/GlLW2tc8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=li5Fp7HS; 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="li5Fp7HS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8543C2BD11; Tue, 21 May 2024 15:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716303880; bh=xnvmbiGr8SLFugm20oHHyP0+oa+NJ7wI9t8mfkVHEs4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=li5Fp7HSXimlBYKu+k68OJaqa55ByNhjZufoRTlHlfgo3W/6hW9Yct6GIGLVeJRtw KEELwtd2YADvdn3V3JAzW4aimDhY2ULaEvuDqDldJ4EcVH7dijiszFcQBAEtllRoJ1 mI5zsOPu/lIv4xHmjuqzZgTVOeYOih9bI+cdNEzI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47364: comedi: Fix memory leak in compat_insnlist() Date: Tue, 21 May 2024 17:03:41 +0200 Message-ID: <2024052138-CVE-2021-47364-a7c7@gregkh> X-Mailer: git-send-email 2.45.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=2203; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=xnvmbiGr8SLFugm20oHHyP0+oa+NJ7wI9t8mfkVHEs4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+20/xfJgSwqiQ5ZzM8L5xmeyDo6mpEezW7jmbuVyLb dicT63uiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgImc5mdYsLr8kYzVOc+O9BeW jPsmTtT/XNv4nWF++Y0LTpc0py/fs6rz2brPuU8vZFioAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: comedi: Fix memory leak in compat_insnlist() `compat_insnlist()` handles the 32-bit version of the `COMEDI_INSNLIST` ioctl (whenwhen `CONFIG_COMPAT` is enabled). It allocates memory to temporarily hold an array of `struct comedi_insn` converted from the 32-bit version in user space. This memory is only being freed if there is a fault while filling the array, otherwise it is leaked. Add a call to `kfree()` to fix the leak. The Linux kernel CVE team has assigned CVE-2021-47364 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit b8d47d881305 and fixed in 5.10.70 with commit 8d6a21e4cd6a Issue introduced in 5.8 with commit b8d47d881305 and fixed in 5.14.9 with commit f217b6c1e28e Issue introduced in 5.8 with commit b8d47d881305 and fixed in 5.15 with commit bb509a6ffed2 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-2021-47364 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/comedi/comedi_fops.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/8d6a21e4cd6a319b0662cbe4ad6199e276ac776a https://git.kernel.org/stable/c/f217b6c1e28ed0b353634ce4d92a155b80bd1671 https://git.kernel.org/stable/c/bb509a6ffed2c8b0950f637ab5779aa818ed1596