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 3CAC9291C15 for ; Wed, 18 Jun 2025 11:14:01 +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=1750245241; cv=none; b=fFSG2Fapu4Fm1lUfPb53+QATWolgLPQqstCMP5lt4T8XiHEbOripxbwo5LkNNy7Hr/h57ON9lw74RVGXSzV0iNXX5aDY+i3yqUQdjHQXIC2DeibGH6eWdehgDV504wiQ+h5h3i/SNEigypg8ct+A2eT9KtjTsTjSkOpsC1dQA+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245241; c=relaxed/simple; bh=l5oQLXRDszFT8MLTm8ab2pDDbG77ejWTiOXQ5wGsfTs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Ma7Zr2hmBWlu/P4aSX0EYElT43vNv+wv19gQqiIEIHHuhVzQt1zshmseoH94G5c1Gb0O++3XsCSQ4YeeN9UCyGMrOwABBrEf/Av4TnOIy0ld965IFHzuiChGxY0NpR5FH3QyP0W4nxL+96xa5tgiJ3+wmIpaGiu41P1oov+dBMo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0KZpv5uC; 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="0KZpv5uC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DCC1C4CEE7; Wed, 18 Jun 2025 11:14:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245241; bh=l5oQLXRDszFT8MLTm8ab2pDDbG77ejWTiOXQ5wGsfTs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0KZpv5uC3056OMnNb2zMvCO0eEdaLLFyiSKpfeBSC/B18sjNIXUpfunckK0jzaNxn tbAdzRw1RbX4sbmPSVzd79OnIuK4tS4j54mSVi64HQ1GC+eL1wvKv0ljaLRqE+mb0I t0j2vTT5Ke+M61cOnAYoV7nqXyN9Ladj4QfV1RvU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50140: memstick/ms_block: Fix a memory leak Date: Wed, 18 Jun 2025 13:03:25 +0200 Message-ID: <2025061818-CVE-2022-50140-cb08@gregkh> X-Mailer: git-send-email 2.49.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=3349; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WfbyxXOZiOwem2iT7e1x8ApBfTpc3jON8LLljrMczng=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc+r29m/ftbDh+mMR7Q0rWD4pLDY72l2wPyBp4qx3W 19XRylxdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEzK4wzK+7eb1runBfq1bX gcf6up88PlvzBDMsaGYPSChyNDb4rfnOOFiyafsfuXVWAA== 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: memstick/ms_block: Fix a memory leak 'erased_blocks_bitmap' is never freed. As it is allocated at the same time as 'used_blocks_bitmap', it is likely that it should be freed also at the same time. Add the corresponding bitmap_free() in msb_data_clear(). The Linux kernel CVE team has assigned CVE-2022-50140 to this issue. Affected and fixed versions =========================== Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 4.14.291 with commit efd675246aec045507b9425c67b548cc2d782d8f Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 4.19.256 with commit 37958980eb4cd71ae594ace093c11b6a91e165e8 Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 5.4.211 with commit 9d8b911fe3c3ed788c66edba7c90e32a4a7a5f53 Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 5.10.137 with commit 9260a154b3b5e387dbceec7c0ac441470646bc6f Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 5.15.61 with commit 961d7d12080fe70847f944d656e36cd0dd0214ba Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 5.18.18 with commit 16e07966638717416abf45393d6a80a5a1034429 Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 5.19.2 with commit 39be95d1ff7b44c1e969af72ba9da7332dfcc1da Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 6.0 with commit 54eb7a55be6779c4d0c25eaf5056498a28595049 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-50140 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/memstick/core/ms_block.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/efd675246aec045507b9425c67b548cc2d782d8f https://git.kernel.org/stable/c/37958980eb4cd71ae594ace093c11b6a91e165e8 https://git.kernel.org/stable/c/9d8b911fe3c3ed788c66edba7c90e32a4a7a5f53 https://git.kernel.org/stable/c/9260a154b3b5e387dbceec7c0ac441470646bc6f https://git.kernel.org/stable/c/961d7d12080fe70847f944d656e36cd0dd0214ba https://git.kernel.org/stable/c/16e07966638717416abf45393d6a80a5a1034429 https://git.kernel.org/stable/c/39be95d1ff7b44c1e969af72ba9da7332dfcc1da https://git.kernel.org/stable/c/54eb7a55be6779c4d0c25eaf5056498a28595049