From mboxrd@z Thu Jan 1 00:00:00 1970 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 9824719E999 for ; Wed, 26 Feb 2025 01:59:02 +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=1740535142; cv=none; b=GyUIao1R1RgP7fr+VEDqWLhkNgD+R6Zr69hRh28ny1uW7nVJ/HDOjqZrprVPKOCHqPWBHgdcOpeNKh06TLmbtBMuUIS/wu5pdOi07mXkbMdKBwbjLK7R3pWKDt0HpqJ1bWa9pMp+7EImvHgOBlmYdg4Q3Q9FfcdBRh++vGR+UME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535142; c=relaxed/simple; bh=qZ31sUXkCWZh5vfYlaI13jnSZzc1FQcE/pTdwcPqiy8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=S8eTsuusZgyYVk+zjBYjIyGzBxWdq4OA8ZXpFoVMhb+GlwSl3SouaN08dJLIUSJANctiO1LgI/BLrVkVPNXVZY6HXwHK3yp87pqCAlH3z/FpjKoyKg77nS9DvpxfBOAtlh/sLlnPeNLXDHVLPDIbzWKzu/IbXZrP7onHw7qkO8A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UqiWwOhw; 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="UqiWwOhw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B83AC4CEE7; Wed, 26 Feb 2025 01:59:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535142; bh=qZ31sUXkCWZh5vfYlaI13jnSZzc1FQcE/pTdwcPqiy8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=UqiWwOhwKjoc9UbmxKoAukqDzLl0y7XWfDo/hvB9nvxdTUnlEXHM0VKWretihF6nJ Yb4MDjhpgvZGjO8taMzTlFJ4AemQrcE9X/JYHxGmhoN9iOQwoBBZW/FdiCbJMzmjxL YGWV9wUvOBneyPJCF9URTFJCeO6KltA7Kd4nBruw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49169: f2fs: use spin_lock to avoid hang Date: Wed, 26 Feb 2025 02:56:14 +0100 Message-ID: <2025022612-CVE-2022-49169-10ae@gregkh> X-Mailer: git-send-email 2.48.1 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=4549; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qZ31sUXkCWZh5vfYlaI13jnSZzc1FQcE/pTdwcPqiy8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SlxEqywFPe9N7ttxltl/R/nr1+r3J+zMKspU+Xx5X i3Ts0PdHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRxACG+Vnnyic/uPalUufc sSKrQywVkRtN4xgWbGXv7jTumn/o0wf+11+lHMKbn8b7AgA= 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: f2fs: use spin_lock to avoid hang [14696.634553] task:cat state:D stack: 0 pid:1613738 ppid:1613735 flags:0x00000004 [14696.638285] Call Trace: [14696.639038] [14696.640032] __schedule+0x302/0x930 [14696.640969] schedule+0x58/0xd0 [14696.641799] schedule_preempt_disabled+0x18/0x30 [14696.642890] __mutex_lock.constprop.0+0x2fb/0x4f0 [14696.644035] ? mod_objcg_state+0x10c/0x310 [14696.645040] ? obj_cgroup_charge+0xe1/0x170 [14696.646067] __mutex_lock_slowpath+0x13/0x20 [14696.647126] mutex_lock+0x34/0x40 [14696.648070] stat_show+0x25/0x17c0 [f2fs] [14696.649218] seq_read_iter+0x120/0x4b0 [14696.650289] ? aa_file_perm+0x12a/0x500 [14696.651357] ? lru_cache_add+0x1c/0x20 [14696.652470] seq_read+0xfd/0x140 [14696.653445] full_proxy_read+0x5c/0x80 [14696.654535] vfs_read+0xa0/0x1a0 [14696.655497] ksys_read+0x67/0xe0 [14696.656502] __x64_sys_read+0x1a/0x20 [14696.657580] do_syscall_64+0x3b/0xc0 [14696.658671] entry_SYSCALL_64_after_hwframe+0x44/0xae [14696.660068] RIP: 0033:0x7efe39df1cb2 [14696.661133] RSP: 002b:00007ffc8badd948 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [14696.662958] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007efe39df1cb2 [14696.664757] RDX: 0000000000020000 RSI: 00007efe399df000 RDI: 0000000000000003 [14696.666542] RBP: 00007efe399df000 R08: 00007efe399de010 R09: 00007efe399de010 [14696.668363] R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000000000 [14696.670155] R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000 [14696.671965] [14696.672826] task:umount state:D stack: 0 pid:1614985 ppid:1614984 flags:0x00004000 [14696.674930] Call Trace: [14696.675903] [14696.676780] __schedule+0x302/0x930 [14696.677927] schedule+0x58/0xd0 [14696.679019] schedule_preempt_disabled+0x18/0x30 [14696.680412] __mutex_lock.constprop.0+0x2fb/0x4f0 [14696.681783] ? destroy_inode+0x65/0x80 [14696.683006] __mutex_lock_slowpath+0x13/0x20 [14696.684305] mutex_lock+0x34/0x40 [14696.685442] f2fs_destroy_stats+0x1e/0x60 [f2fs] [14696.686803] f2fs_put_super+0x158/0x390 [f2fs] [14696.688238] generic_shutdown_super+0x7a/0x120 [14696.689621] kill_block_super+0x27/0x50 [14696.690894] kill_f2fs_super+0x7f/0x100 [f2fs] [14696.692311] deactivate_locked_super+0x35/0xa0 [14696.693698] deactivate_super+0x40/0x50 [14696.694985] cleanup_mnt+0x139/0x190 [14696.696209] __cleanup_mnt+0x12/0x20 [14696.697390] task_work_run+0x64/0xa0 [14696.698587] exit_to_user_mode_prepare+0x1b7/0x1c0 [14696.700053] syscall_exit_to_user_mode+0x27/0x50 [14696.701418] do_syscall_64+0x48/0xc0 [14696.702630] entry_SYSCALL_64_after_hwframe+0x44/0xae The Linux kernel CVE team has assigned CVE-2022-49169 to this issue. Affected and fixed versions =========================== Fixed in 5.15.33 with commit 2eff60346e7ae1a24cd868b8fdcf58e946e7dde1 Fixed in 5.16.19 with commit 738886004bd2885ac2db0bc63b4874aa471ca87e Fixed in 5.17.2 with commit ec4187d45cc1c2d69fffeee5fa6aa4cb62477cfb Fixed in 5.18 with commit 98237fcda4a24e67b0a4498c17d5aa4ad4537bc7 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-49169 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/f2fs/debug.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/2eff60346e7ae1a24cd868b8fdcf58e946e7dde1 https://git.kernel.org/stable/c/738886004bd2885ac2db0bc63b4874aa471ca87e https://git.kernel.org/stable/c/ec4187d45cc1c2d69fffeee5fa6aa4cb62477cfb https://git.kernel.org/stable/c/98237fcda4a24e67b0a4498c17d5aa4ad4537bc7