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 3DD511FA26F for ; Mon, 21 Oct 2024 18:05:18 +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=1729533918; cv=none; b=CG4G3BfnT4a6q4x5eA5n3g3wkjZHPTp867mh8o2G/6t7n9HIl9iMMGDKpkNKH/RD3Qc2qRb6TcoKEqlAK/V2x87uZnWh+V2faMMmzgFI4PSMTCWWZxW8glrQpTMMcsuln8DA2+4d+yJUtaU3/YtduewJNiHI7lGpqukrrTpPh28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533918; c=relaxed/simple; bh=ifOh/y95tn8oPSB3tn4kKKmeuCouSdWviLWlxhcQ49k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DyJdWFYtVUbnxZuu2wGqsyB81PR6xwc+RnA+InRoi1I/Gctg89sjTCuqJJ8aSAagkav2Gvi04w5ASUp28RX7ZlOUHojC54B653NobtuOeU87KxUNwfLaIfK0jNXDwfmTJ5izqqfv3+rVTm/vYzEmuAvhEVhn5myYbF5pj7nRbYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ciSRPypY; 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="ciSRPypY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5C16C4CEC3; Mon, 21 Oct 2024 18:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729533918; bh=ifOh/y95tn8oPSB3tn4kKKmeuCouSdWviLWlxhcQ49k=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ciSRPypYnMb57HIkJvoE2D3YiwS/xc4AdAVsO7gcCnpwollNRkUvA4biMunfZr8kO H2Q3e337uIHWV1yZRcvJiNsVR1eHvgZ3X3z1SjUy307ovgkYlrhEkRwM834U6VRYew jx3Do/wJLi5bWqzPhELxzmKrIRh6pWVpVUyfA3ZA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-49933: blk_iocost: fix more out of bound shifts Date: Mon, 21 Oct 2024 20:02:21 +0200 Message-ID: <2024102126-CVE-2024-49933-f918@gregkh> X-Mailer: git-send-email 2.47.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=3119; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ifOh/y95tn8oPSB3tn4kKKmeuCouSdWviLWlxhcQ49k=; b=owGbwMvMwCRo6H6F97bub03G02pJDOli075d8Hm26Yb5xHVfhULWHdhp3FFpOiHn/PNLqjLRc V7C84P+dcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEIg8wzGIyO5C+cCcP+95V mf67elY42JituMkwz16njiGuLGKvSAWfHudazsUb3ty+CQA= 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: blk_iocost: fix more out of bound shifts Recently running UBSAN caught few out of bound shifts in the ioc_forgive_debts() function: UBSAN: shift-out-of-bounds in block/blk-iocost.c:2142:38 shift exponent 80 is too large for 64-bit type 'u64' (aka 'unsigned long long') ... UBSAN: shift-out-of-bounds in block/blk-iocost.c:2144:30 shift exponent 80 is too large for 64-bit type 'u64' (aka 'unsigned long long') ... Call Trace: dump_stack_lvl+0xca/0x130 __ubsan_handle_shift_out_of_bounds+0x22c/0x280 ? __lock_acquire+0x6441/0x7c10 ioc_timer_fn+0x6cec/0x7750 ? blk_iocost_init+0x720/0x720 ? call_timer_fn+0x5d/0x470 call_timer_fn+0xfa/0x470 ? blk_iocost_init+0x720/0x720 __run_timer_base+0x519/0x700 ... Actual impact of this issue was not identified but I propose to fix the undefined behaviour. The proposed fix to prevent those out of bound shifts consist of precalculating exponent before using it the shift operations by taking min value from the actual exponent and maximum possible number of bits. The Linux kernel CVE team has assigned CVE-2024-49933 to this issue. Affected and fixed versions =========================== Fixed in 5.10.227 with commit 1f61d509257d Fixed in 5.15.168 with commit f4ef9bef023d Fixed in 6.1.113 with commit 59121bb38fdc Fixed in 6.6.55 with commit 1ab2cfe19700 Fixed in 6.10.14 with commit 1b120f151871 Fixed in 6.11.3 with commit 364022095bdd Fixed in 6.12-rc1 with commit 9bce8005ec0d 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-2024-49933 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: block/blk-iocost.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/1f61d509257d6a05763d05bf37943b35306522b1 https://git.kernel.org/stable/c/f4ef9bef023d5c543cb0f3194ecacfd47ef590ec https://git.kernel.org/stable/c/59121bb38fdc01434ea3fe361ee02b59f036227f https://git.kernel.org/stable/c/1ab2cfe19700fb3dde4c7dfec392acff34db3120 https://git.kernel.org/stable/c/1b120f151871eb47ce9f283c007af3f8ae1d990e https://git.kernel.org/stable/c/364022095bdd4108efdaaa68576afa4712a5d085 https://git.kernel.org/stable/c/9bce8005ec0dcb23a58300e8522fe4a31da606fa