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 262F32EC0B5 for ; Tue, 30 Dec 2025 12:22:34 +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=1767097354; cv=none; b=ho2Rk+i/mwohbBvicCOgAiZJOXEfcOkijjl+G6a3yycLy2YTPenQX4h9yTl8XXvmlB1+HQQgFSk7R9SA0coFdI/LxYQI+c40RoOz9x4J0X7tPJI8dtZbWGV34FfcLTVDop53crtdl3zbA0DVLMV6CoQ74Rpaxv7H4x4ecfEuv48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767097354; c=relaxed/simple; bh=8VR9hCsuyB/67Q2rdyMc83kDwVoLVj5D0HYqJ3Tl6x8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jsHLfOSiPmRseiIMW/MRDRc1xY8CtFVkWG+/ArLYsqfuximw3USE6Ak5ahifWT4VfjhQgmXZD/5J+6+l00Pum72624NbhTFPmQZnq14VaICf9qGYBOiL3fB2IaES+JRRz4YBaesUYQs64+Oa8sdpJFKOdzB2JgoyyDp8gcv+/tM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mfdo2a2d; 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="mfdo2a2d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3005C4CEFB; Tue, 30 Dec 2025 12:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767097354; bh=8VR9hCsuyB/67Q2rdyMc83kDwVoLVj5D0HYqJ3Tl6x8=; h=From:To:Cc:Subject:Date:Reply-To:From; b=mfdo2a2dcDMhpAkflIRfZ55/AScZD0arVrho5oEW61PrX8buTKn80trP0oZvmkd6t w3YuA8gQX0tJS+h1k+pqioMg4lnF1O7eEHkE33jE4dAZfAv1gSh956YpYNC0RLDcds muTQ86nfe1bNYQp+nt6VVtVTUAWT7Czlj2NDOQgE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50864: nilfs2: fix shift-out-of-bounds due to too large exponent of block size Date: Tue, 30 Dec 2025 13:20:00 +0100 Message-ID: <2025123049-CVE-2022-50864-6bcd@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2649; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UUWPW9pEGNGbcgAoIYMW0HevgF/3m8vVdph+Zs+WZw4=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBh1Nzs9q3b19ZETnfsHnuYqFDj3ND7vRUTL+1WW7PD c/0bW8TOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiPysZ5orNfznj6LVVC17c uux23vCaBz/XhRCG+W4dQY49G0SPsxjaynZd7Lv4Mjn3JQA= 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: nilfs2: fix shift-out-of-bounds due to too large exponent of block size If field s_log_block_size of superblock data is corrupted and too large, init_nilfs() and load_nilfs() still can trigger a shift-out-of-bounds warning followed by a kernel panic (if panic_on_warn is set): shift exponent 38973 is too large for 32-bit type 'int' Call Trace: dump_stack_lvl+0xcd/0x134 ubsan_epilogue+0xb/0x50 __ubsan_handle_shift_out_of_bounds.cold.12+0x17b/0x1f5 init_nilfs.cold.11+0x18/0x1d [nilfs2] nilfs_mount+0x9b5/0x12b0 [nilfs2] ... This fixes the issue by adding and using a new helper function for getting block size with sanity check. The Linux kernel CVE team has assigned CVE-2022-50864 to this issue. Affected and fixed versions =========================== Fixed in 5.10.163 with commit ec93b5430ec0f60877a5388bb023d60624f9ab9f Fixed in 5.15.86 with commit 8b6ef451b5701b37d9a5905534595776a662edfc Fixed in 6.0.16 with commit ddb6615a168f97b91175e00eda4c644741cf531c Fixed in 6.1.2 with commit a16731fa1b96226c75bbf18e73513b14fc318360 Fixed in 6.2 with commit ebeccaaef67a4895d2496ab8d9c2fb8d89201211 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-50864 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: fs/nilfs2/the_nilfs.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/ec93b5430ec0f60877a5388bb023d60624f9ab9f https://git.kernel.org/stable/c/8b6ef451b5701b37d9a5905534595776a662edfc https://git.kernel.org/stable/c/ddb6615a168f97b91175e00eda4c644741cf531c https://git.kernel.org/stable/c/a16731fa1b96226c75bbf18e73513b14fc318360 https://git.kernel.org/stable/c/ebeccaaef67a4895d2496ab8d9c2fb8d89201211