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 377D51F9ED8 for ; Mon, 21 Oct 2024 18:54:33 +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=1729536874; cv=none; b=MbeHf6c3+odLGsi/mxyQ6F+EXiC2djqb5klMbLLn8yO0KrbEBw5jMNe/AUMZxPJdfV9dvs7LSKmhIwNFE3APkGn121ZVwyN//zs6EPcO9lHRdNW48uKcbXptj9BVbtzARGrkOt2HxFBfObfj5L0H63lI6dYvmmJTALegaDoPoDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729536874; c=relaxed/simple; bh=va620uM741pi4gt0hB/K2f0jOMy5TAzOn4ZHe+JKncs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mWk/ybWr2zTJOeNLWKRJM96vUjs+L4619zOshPA8KEzy+Is72EtzxHlyg7ADx3XVlkZ3H0OOkmOCXmxzA2jnCs1PjOsh/nV8j22KBojZ/8Wt08yb+5icpSvOIFBT4LptEitdGJOGNA2MMlXuawMWtPOPn/Rkf8Tl+nuiv7nSWPM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=q7mjxH6t; 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="q7mjxH6t" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44E2FC4CEC3; Mon, 21 Oct 2024 18:54:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729536873; bh=va620uM741pi4gt0hB/K2f0jOMy5TAzOn4ZHe+JKncs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=q7mjxH6t0rQ/3GtNb8VqOM111nNwgWM+5/eHIWw6Iptg8MbIQP86d+7kTTPmW/Msx MyEY+TKZ1dlQ52YGuTpMKBP6QKDSLcdJEcoOTFcLTGJ1oIqCiPur72GeESP6lZYH11 wfZEJr3SlL6l/iyw4jZnJNSHVb6pnj/Fsx9KTmzE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50014: ext4: fix access to uninitialised lock in fc replay path Date: Mon, 21 Oct 2024 20:54:18 +0200 Message-ID: <2024102110-CVE-2024-50014-d684@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=3183; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=va620uM741pi4gt0hB/K2f0jOMy5TAzOn4ZHe+JKncs=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlii4NCV93d5hVsmJJydtvUjepmYYqyEeHeJRs/35j7b /EMi4XMHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARjXKGeebnvZ6LfbDbviNr hvPJZMmU9c9NLzMsmJt9QbR5lWoq15xPseHLGZrz/13kAAA= 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: ext4: fix access to uninitialised lock in fc replay path The following kernel trace can be triggered with fstest generic/629 when executed against a filesystem with fast-commit feature enabled: INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. CPU: 0 PID: 866 Comm: mount Not tainted 6.10.0+ #11 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x66/0x90 register_lock_class+0x759/0x7d0 __lock_acquire+0x85/0x2630 ? __find_get_block+0xb4/0x380 lock_acquire+0xd1/0x2d0 ? __ext4_journal_get_write_access+0xd5/0x160 _raw_spin_lock+0x33/0x40 ? __ext4_journal_get_write_access+0xd5/0x160 __ext4_journal_get_write_access+0xd5/0x160 ext4_reserve_inode_write+0x61/0xb0 __ext4_mark_inode_dirty+0x79/0x270 ? ext4_ext_replay_set_iblocks+0x2f8/0x450 ext4_ext_replay_set_iblocks+0x330/0x450 ext4_fc_replay+0x14c8/0x1540 ? jread+0x88/0x2e0 ? rcu_is_watching+0x11/0x40 do_one_pass+0x447/0xd00 jbd2_journal_recover+0x139/0x1b0 jbd2_journal_load+0x96/0x390 ext4_load_and_init_journal+0x253/0xd40 ext4_fill_super+0x2cc6/0x3180 ... In the replay path there's an attempt to lock sbi->s_bdev_wb_lock in function ext4_check_bdev_write_error(). Unfortunately, at this point this spinlock has not been initialized yet. Moving it's initialization to an earlier point in __ext4_fill_super() fixes this splat. The Linux kernel CVE team has assigned CVE-2024-50014 to this issue. Affected and fixed versions =========================== Fixed in 6.10.14 with commit d157fc20ca52 Fixed in 6.11.3 with commit b002031d585a Fixed in 6.12-rc1 with commit 23dfdb56581a 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-50014 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/ext4/super.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/d157fc20ca5239fd56965a5a8aa1a0e25919891a https://git.kernel.org/stable/c/b002031d585a14eed511117dda8c6452a804d508 https://git.kernel.org/stable/c/23dfdb56581ad92a9967bcd720c8c23356af74c1