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 827B14F1EB for ; Tue, 27 Feb 2024 18:47:43 +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=1709059663; cv=none; b=kcfvs42/H6ogcKbvjXqFp82Irq1HxrFRNLatTrtwI8qGPfSoyuQuA0n2loichEfOru4VUVL0U14bPfWReMkW4EdMz3ug6UTMp7doIQ/fxAkYDpkZ6dMGM+dDtqvdWZpzbVfcydUHM5ZnRyuIdiFutyn+UEOezXTMulB3QO4EEW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059663; c=relaxed/simple; bh=9WqP533Sm0Xb0ywrz8KIPDNlYWEfBWrwMTBy1IWHu3M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=erH4ZOmXquckZgVz0SpQlZE4fB1hFRRaDLJOqFpgx0j2xdNCzZTNABG9oXlSQ9gBk3FvzKfvY7d3HUMiYuZmw+ja7k1/0mgcjVnFxneAwR3ZKF/w6DkBrH/OP2fQi7XZQbjaxseKemkODP0OHxsRiRgLB3DcOvqCfo0QxfgRYtQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hy1x7Lpj; 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="hy1x7Lpj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5A03C433F1; Tue, 27 Feb 2024 18:47:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709059663; bh=9WqP533Sm0Xb0ywrz8KIPDNlYWEfBWrwMTBy1IWHu3M=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hy1x7Lpj5cRLVQmCgpelYoWHaqby0Iv8ph8jEgjBLse7fKW7rgoOEnLd3e3APj+8k E65VE+C+IR3pfgl9EbB6wEHlo9QiArrVVaq/HnZmoaINudn7uX28EGbJpTceMBLQcy T2ZOtstmoK6pM1mjGDDWEMmmZrtJ1ebnaB6pkHE0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-46968: s390/zcrypt: fix zcard and zqueue hot-unplug memleak Date: Tue, 27 Feb 2024 19:47:28 +0100 Message-ID: <2024022720-CVE-2021-46968-8c71@gregkh> X-Mailer: git-send-email 2.44.0 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=2486; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9WqP533Sm0Xb0ywrz8KIPDNlYWEfBWrwMTBy1IWHu3M=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn39Cwkc7R98tVeLftX9vRzwqmpggx1lVYtp5iPth3a/ MRL1664I4aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZyko9hwdJHptHBx5Keapgo zt0lVNbVyiltxzDda8NsnXkMy9W/XE6XPi+2KqXTegkA 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: s390/zcrypt: fix zcard and zqueue hot-unplug memleak Tests with kvm and a kmemdebug kernel showed, that on hot unplug the zcard and zqueue structs for the unplugged card or queue are not properly freed because of a mismatch with get/put for the embedded kref counter. This fix now adjusts the handling of the kref counters. With init the kref counter starts with 1. This initial value needs to drop to zero with the unregister of the card or queue to trigger the release and free the object. The Linux kernel CVE team has assigned CVE-2021-46968 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit 29c2680fd2bf and fixed in 5.10.36 with commit 026499a9c2e0 Issue introduced in 5.10 with commit 29c2680fd2bf and fixed in 5.11.20 with commit 055a063a18bc Issue introduced in 5.10 with commit 29c2680fd2bf and fixed in 5.12.3 with commit 971dc8706cee Issue introduced in 5.10 with commit 29c2680fd2bf and fixed in 5.13 with commit 70fac8088cfa Please see https://www.kernel.org or 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-46968 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/s390/crypto/zcrypt_card.c drivers/s390/crypto/zcrypt_queue.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/026499a9c2e002e621ad568d1378324ae97e5524 https://git.kernel.org/stable/c/055a063a18bcd19b93709e3eac8078d6b2f04599 https://git.kernel.org/stable/c/971dc8706cee47393d393905d294ea47e39503d3 https://git.kernel.org/stable/c/70fac8088cfad9f3b379c9082832b4d7532c16c2