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 E5C8F2877E3 for ; Wed, 18 Jun 2025 11:05:44 +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=1750244745; cv=none; b=fe/1qDz9ltl1zRy1oggQOGsnDyISxtKwKqZ9VY+yxUAji9MaJBhq1mEBB30i9VXb8N+UT/feF9BG4TVNbSSJW/MR+A5UvK9qaLhF40XLCNBsM3LoPZ+h/vBYj5/TO0AHg5IAokUFiGSW70hiO0EpQzlqpbep+X9ncVHEI43g0ZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244745; c=relaxed/simple; bh=18bnX2CO6Oa8DbGKN+12VDmXUEnVFtMiAuRvtxMXkvI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JaiaWVFov6mzslPEyohrxdm1IisOBu6euIsGeGHTae2oV/E36wB/Bmw/pUHN0U/DapJmuIUCsnbYKgk4eEAhqQIJtLRKCTzwuEvToQDHiQhy943tlAEl2nINeJnR4yb8yc0O6/EsDEF29S1JizqANtkc5LFQhuxEULq+t3B8S9w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nrr2J3Jl; 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="nrr2J3Jl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A619C4CEED; Wed, 18 Jun 2025 11:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244744; bh=18bnX2CO6Oa8DbGKN+12VDmXUEnVFtMiAuRvtxMXkvI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=nrr2J3Jlei/vNCMDRr7wwAEBMTlqaB/Z1/xUTwJb+2/Ru+msVPzYpqdz4rVdgCwZM 7hrN4PwvO+wziUQ0bVmltAC289v5u/Tb8Xu9fSUDpZWPJiCf0TC4PE1a+eRjok5zsV NffA/0Z0P4T1dv5JQ17UZaNjlmUK4LUfj2VlDrRk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50022: drivers:md:fix a potential use-after-free bug Date: Wed, 18 Jun 2025 13:01:27 +0200 Message-ID: <2025061835-CVE-2022-50022-98b6@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=2795; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4W7y7oZrCjwFfKOJaRKWUrT++J5VuKsNFdr8halVeo4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc0JCPK7O5K9yPB3v3JPQ+l5DofvCh5rZNYtPadvdv n67/HpDRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkrTvDghs3HjU2bppn/LDX 7ltxzfHTrTN75zDMT1zSpqRqsSjx/zTmrRMzX3bbRJ+YCAA= 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: drivers:md:fix a potential use-after-free bug In line 2884, "raid5_release_stripe(sh);" drops the reference to sh and may cause sh to be released. However, sh is subsequently used in lines 2886 "if (sh->batch_head && sh != sh->batch_head)". This may result in an use-after-free bug. It can be fixed by moving "raid5_release_stripe(sh);" to the bottom of the function. The Linux kernel CVE team has assigned CVE-2022-50022 to this issue. Affected and fixed versions =========================== Fixed in 4.9.326 with commit 7470a4314b239e9a9580f248fdf4c9a92805490e Fixed in 4.14.291 with commit 09cf99bace7789d91caa8d10fbcfc8b2fb35857f Fixed in 4.19.256 with commit e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13 Fixed in 5.4.211 with commit f5d46f1b47f65da1faf468277b261eb78c8e25b5 Fixed in 5.10.138 with commit 5d8325fd15892c8ab1146edc1d7ed8463de39636 Fixed in 5.15.63 with commit d9b94c3ace549433de8a93eeb27b0391fc8ac406 Fixed in 5.19.4 with commit eb3a4f73f43f839df981dda5859e8e075067a360 Fixed in 6.0 with commit 104212471b1c1817b311771d817fb692af983173 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-50022 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/md/raid5.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/7470a4314b239e9a9580f248fdf4c9a92805490e https://git.kernel.org/stable/c/09cf99bace7789d91caa8d10fbcfc8b2fb35857f https://git.kernel.org/stable/c/e5b3dd2d92c4511e81f6e4ec9c5bb7ad25e03d13 https://git.kernel.org/stable/c/f5d46f1b47f65da1faf468277b261eb78c8e25b5 https://git.kernel.org/stable/c/5d8325fd15892c8ab1146edc1d7ed8463de39636 https://git.kernel.org/stable/c/d9b94c3ace549433de8a93eeb27b0391fc8ac406 https://git.kernel.org/stable/c/eb3a4f73f43f839df981dda5859e8e075067a360 https://git.kernel.org/stable/c/104212471b1c1817b311771d817fb692af983173