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 B618A2C1AE for ; Wed, 28 Feb 2024 08:17:47 +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=1709108267; cv=none; b=dPeyQeFFip0Cla0tXcX4P283pYCVRGMIqnDlPSa+XcFG+FM9yPDGKh0LYOAnH1GokjI1ObgbApRBboknSpAzNszkbRmSx5katil4XiZTQIHanGDqt/WXWDxRJ+lDjQJPenOkFiVpFYJAEvLNe0OzEynrbqN6Tu0aM+rr9FapDGk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709108267; c=relaxed/simple; bh=fn002Dco8z8UvaSBGdp/1FFUFUL/0ir6U2cyKpp6PCE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=udGY8hLRXmuO36iuyyK1gD7mL3N/DjKGrB5GTHT4yJFS8bUgp7VmJl1gwHSDOYRfv/5GxA3oYPN9u9ITsf3ldDN5ZGuinQQ3Fa/SVukNAxPPMNM9rlSkSvU387SZkZ63pCAkEW83MeXJySqR7JmYRN5phLpdktslAvRE6/HSpyI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sGTfTBr2; 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="sGTfTBr2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42CDCC433F1; Wed, 28 Feb 2024 08:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709108267; bh=fn002Dco8z8UvaSBGdp/1FFUFUL/0ir6U2cyKpp6PCE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=sGTfTBr2fLwq+guCdyzbUKxkp1sjfmod8+yNrn55NCH/eOM7IPazipzbobhWfi6FD 4aQhUqFLht1yJa/fZWgHQcqwhtX0axZNlaY15LWOMMJ76qSuWfh1zWtw6KH0C6SKid Hrf4K0U+h4VrJUGlP4BePHnH6ELucY+48Y5oaxeU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: gregkh@kernel.org Subject: CVE-2021-47039: ataflop: potential out of bounds in do_format() Date: Wed, 28 Feb 2024 09:15:27 +0100 Message-ID: <2024022837-CVE-2021-47039-638f@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=2032; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kzRBbF4qlcxKxjj2G6tL3ZHDPJge06QBuin85kzBNlg=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn3XudWzPD5yd0dcjXzyYGK56eOKgjli7vvl/vjw2v68 K1p5XuLjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIPCWG+RkZqWd+dt6uj3uZ MHXaofx8vlB7V4YFK3aknohmfDUnJexR0bzQm1UHhd8bAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: gregkh@kernel.org Description =========== In the Linux kernel, the following vulnerability has been resolved: ataflop: potential out of bounds in do_format() The function uses "type" as an array index: q = unit[drive].disk[type]->queue; Unfortunately the bounds check on "type" isn't done until later in the function. Fix this by moving the bounds check to the start. The Linux kernel CVE team has assigned CVE-2021-47039 to this issue. Affected and fixed versions =========================== Issue introduced in 5.11 with commit bf9c0538e485 and fixed in 5.11.21 with commit 07f86aa8f4fe Issue introduced in 5.11 with commit bf9c0538e485 and fixed in 5.12.4 with commit 2a3a8bbca28b Issue introduced in 5.11 with commit bf9c0538e485 and fixed in 5.13 with commit 1ffec389a643 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-47039 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/block/ataflop.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/07f86aa8f4fe077be1b018cc177eb8c6573e5671 https://git.kernel.org/stable/c/2a3a8bbca28b899806844c00d49ed1b7ccb50957 https://git.kernel.org/stable/c/1ffec389a6431782a8a28805830b6fae9bf00af1