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 BC8081E1A2D for ; Wed, 16 Apr 2025 14:18:30 +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=1744813110; cv=none; b=HqRhASlNvAv1nmQ5iYzZFsn/dds+OnQ+av6Ppds37vNL4ZMCJUN6MDPPuqbFKHHcoFVn9LmerjAKoQQDb/l0N1iAFxdt/Ez6GTcYZr4feuSkqzDJXd1vIUw0KY9ryKTm/fwLsykAA4Tct0i8+Kubrx9AEPvo3nDN6ZrjLiY+eAw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744813110; c=relaxed/simple; bh=CLmuqdB7O7PeGgaZWAXcPbm+SxkH74Q6ZbAbJ+vMxjo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uXIq+I3gpX3QO5NznQcMUH6hqYJX578pSiQJhDdJ0kcvgxd899bwTKgcrpNZ3plSuqFlZhe0YOEBuutTlDRv2XDLB0v0HQ+Aq8pHecv33p1RyRrpyjUvO6G0CXfJpp2dLDZOcrvU5lHYce6w0SLAlvKTFXPw3t9pbEzJ2lFZWew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yJ9Ikxve; 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="yJ9Ikxve" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3384DC4CEE2; Wed, 16 Apr 2025 14:18:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744813110; bh=CLmuqdB7O7PeGgaZWAXcPbm+SxkH74Q6ZbAbJ+vMxjo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yJ9IkxveXlFsnCd4o9i+wktpVvIXDqOUvU44XaDpOdOKr8ss0Pz1jh1VSZDIVcAjn 4nZ0E+CxVQjKNd6Xm9vObWxmEMnrVf6+WX0pnckmlWLtrNQQlzdHON9hj78YEjBFwe V/VmyegUISlGz6mAuuYeN2a0J8mWLBK343X9/qqc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-22120: ext4: goto right label 'out_mmap_sem' in ext4_setattr() Date: Wed, 16 Apr 2025 16:13:31 +0200 Message-ID: <2025041627-CVE-2025-22120-24ce@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=2871; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=CLmuqdB7O7PeGgaZWAXcPbm+SxkH74Q6ZbAbJ+vMxjo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/d53WO3i/RuO/o2SxMN+NvpUeW4Jne+/54Lkx03HDr ZYFZbsOd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEquYxLFg6werM5tLGDzKT RDlWiRl1sNdw5zMsuJy7O8tnfkdDcvjE02s2MC82j092BQA= 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: goto right label 'out_mmap_sem' in ext4_setattr() Otherwise, if ext4_inode_attach_jinode() fails, a hung task will happen because filemap_invalidate_unlock() isn't called to unlock mapping->invalidate_lock. Like this: EXT4-fs error (device sda) in ext4_setattr:5557: Out of memory INFO: task fsstress:374 blocked for more than 122 seconds. Not tainted 6.14.0-rc1-next-20250206-xfstests-dirty #726 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:fsstress state:D stack:0 pid:374 tgid:374 ppid:373 task_flags:0x440140 flags:0x00000000 Call Trace: __schedule+0x2c9/0x7f0 schedule+0x27/0xa0 schedule_preempt_disabled+0x15/0x30 rwsem_down_read_slowpath+0x278/0x4c0 down_read+0x59/0xb0 page_cache_ra_unbounded+0x65/0x1b0 filemap_get_pages+0x124/0x3e0 filemap_read+0x114/0x3d0 vfs_read+0x297/0x360 ksys_read+0x6c/0xe0 do_syscall_64+0x4b/0x110 entry_SYSCALL_64_after_hwframe+0x76/0x7e The Linux kernel CVE team has assigned CVE-2025-22120 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit c7fc0366c65628fd69bfc310affec4918199aae2 and fixed in 6.14.2 with commit 32d872e3905746ff1048078256cb00f946b97d8a Issue introduced in 6.13 with commit c7fc0366c65628fd69bfc310affec4918199aae2 and fixed in 6.15-rc1 with commit 7e91ae31e2d264155dfd102101afc2de7bd74a64 Issue introduced in 6.6.70 with commit 93011887013dbaa0e3a0285176ca89be153df651 Issue introduced in 6.12.5 with commit b6ce2dbe984bcd7fb0c1df15b5e2fa57e1574a8e 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-22120 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/inode.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/32d872e3905746ff1048078256cb00f946b97d8a https://git.kernel.org/stable/c/7e91ae31e2d264155dfd102101afc2de7bd74a64