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 ECEE72690E7 for ; Fri, 18 Apr 2025 07:03:16 +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=1744959797; cv=none; b=AThQHWEfmQN0WCD/2atQsaE1LWsi1Djcc7iifAoCrGwNmBx9EHF4z0ElXOODBBno5PR8Aqh2bS8Y6UCMo9STahRyIf2w2GNO9UdaEyoU/xaeG3vb+e7M4KLmepFFdYknp3G2Uup03LlJQWTrLRYrnZ9XJVMRjtKhGJKJtCHBtsU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744959797; c=relaxed/simple; bh=cVfA9XsJurkNgx9dwQYpGB5+o8GwEOMoVSvEmN9lkjk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kOBIivShRgnxFprvxuV2K2b1GxOcLOYzdyD5MZL8L1zy62B0o7fo99BzwbewYoETUTxeLCCG0r87FWExoS9/kogUt8+9Tuz/2QMToC1pM1ezkNY3UszrqP3noCOEC4Pkkh5yDSV74UoFBcSqX+9uCgkFOb3RkUY2qF3DCazo7m0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pcMvBqBy; 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="pcMvBqBy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80E88C4CEE2; Fri, 18 Apr 2025 07:03:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744959796; bh=cVfA9XsJurkNgx9dwQYpGB5+o8GwEOMoVSvEmN9lkjk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pcMvBqByePSEOLC1NMQPa3OIlVXX5F13sW1opMQejoH4nqbFajpoNiOq5mWgWMCW2 RHQOpwj2i3tqU+QnYIzbKyCfF0y0G4AZqZOP3Ez7s18zOonOH43CQS0Gr3kGogzJs/ DjwIaMGfbXhJNSXd92UQTP9wz/cuAT6VLzDRgto4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37925: jfs: reject on-disk inodes of an unsupported type Date: Fri, 18 Apr 2025 09:02:17 +0200 Message-ID: <2025041816-CVE-2025-37925-9765@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=4329; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OHJNkEdOv0wGHAw9QDB+eenmJzNyWoBDJdH3CP6QBC8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmMP37+TMgQn9l0Uuu1uETwtWz+w1tPrblwxX7XXN2dS 7LStynKdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBETPsYFmwXO/mm8V0b8+GY g4EdqknHe2tf9DIs2HNm8erStoxtG379lOP87iISYP+9DAA= 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: jfs: reject on-disk inodes of an unsupported type Syzbot has reported the following BUG: kernel BUG at fs/inode.c:668! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 3 UID: 0 PID: 139 Comm: jfsCommit Not tainted 6.12.0-rc4-syzkaller-00085-g4e46774408d9 #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-3.fc41 04/01/2014 RIP: 0010:clear_inode+0x168/0x190 Code: 4c 89 f7 e8 ba fe e5 ff e9 61 ff ff ff 44 89 f1 80 e1 07 80 c1 03 38 c1 7c c1 4c 89 f7 e8 90 ff e5 ff eb b7 0b e8 01 5d 7f ff 90 0f 0b e8 f9 5c 7f ff 90 0f 0b e8 f1 5c 7f RSP: 0018:ffffc900027dfae8 EFLAGS: 00010093 RAX: ffffffff82157a87 RBX: 0000000000000001 RCX: ffff888104d4b980 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc900027dfc90 R08: ffffffff82157977 R09: fffff520004fbf38 R10: dffffc0000000000 R11: fffff520004fbf38 R12: dffffc0000000000 R13: ffff88811315bc00 R14: ffff88811315bda8 R15: ffff88811315bb80 FS: 0000000000000000(0000) GS:ffff888135f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005565222e0578 CR3: 0000000026ef0000 CR4: 00000000000006f0 Call Trace: ? __die_body+0x5f/0xb0 ? die+0x9e/0xc0 ? do_trap+0x15a/0x3a0 ? clear_inode+0x168/0x190 ? do_error_trap+0x1dc/0x2c0 ? clear_inode+0x168/0x190 ? __pfx_do_error_trap+0x10/0x10 ? report_bug+0x3cd/0x500 ? handle_invalid_op+0x34/0x40 ? clear_inode+0x168/0x190 ? exc_invalid_op+0x38/0x50 ? asm_exc_invalid_op+0x1a/0x20 ? clear_inode+0x57/0x190 ? clear_inode+0x167/0x190 ? clear_inode+0x168/0x190 ? clear_inode+0x167/0x190 jfs_evict_inode+0xb5/0x440 ? __pfx_jfs_evict_inode+0x10/0x10 evict+0x4ea/0x9b0 ? __pfx_evict+0x10/0x10 ? iput+0x713/0xa50 txUpdateMap+0x931/0xb10 ? __pfx_txUpdateMap+0x10/0x10 jfs_lazycommit+0x49a/0xb80 ? _raw_spin_unlock_irqrestore+0x8f/0x140 ? lockdep_hardirqs_on+0x99/0x150 ? __pfx_jfs_lazycommit+0x10/0x10 ? __pfx_default_wake_function+0x10/0x10 ? __kthread_parkme+0x169/0x1d0 ? __pfx_jfs_lazycommit+0x10/0x10 kthread+0x2f2/0x390 ? __pfx_jfs_lazycommit+0x10/0x10 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x4d/0x80 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 This happens when 'clear_inode()' makes an attempt to finalize an underlying JFS inode of unknown type. According to JFS layout description from https://jfs.sourceforge.net/project/pub/jfslayout.pdf, inode types from 5 to 15 are reserved for future extensions and should not be encountered on a valid filesystem. So add an extra check for valid inode type in 'copy_from_dinode()'. The Linux kernel CVE team has assigned CVE-2025-37925 to this issue. Affected and fixed versions =========================== Issue introduced in 3.1 with commit 79ac5a46c5c1c17476fbf84b4d4600d6d565defd and fixed in 6.14.2 with commit 8987891c4653874d5e3f5d11f063912f4e0b58eb Issue introduced in 3.1 with commit 79ac5a46c5c1c17476fbf84b4d4600d6d565defd and fixed in 6.15-rc1 with commit 8c3f9a70d2d4dd6c640afe294b05c6a0a45434d9 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-2025-37925 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/jfs/jfs_imap.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/8987891c4653874d5e3f5d11f063912f4e0b58eb https://git.kernel.org/stable/c/8c3f9a70d2d4dd6c640afe294b05c6a0a45434d9