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 4DF2628981C for ; Wed, 18 Jun 2025 11:07:36 +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=1750244856; cv=none; b=TIahbye4MQK6ApFoFqipnP2Djv67iN9I8RqOSS7PbAjI/nKP1T5G7EYT5/tqDKuPUFcoEujolUEHfytuAL/s0y4QmFaY5/V0eravMTrblhJZksWEKUOFJkDwBMvLLLev37JGmtpshXZwzUcfnrQiZgEh0CMTTkEC0rWpVD5OXLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244856; c=relaxed/simple; bh=y4jBadEmzLfUqCZLOu4im5rHu+w77iwVzOAXNRckp8U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YOQEzLVuPIoP1GHIu6x95JtAISrj29L56tBWs12eJPwy572CGhA2sqQpfyIqWGKZkkOj7uqU6GHkn5gDJLUButELRZq1YlknNC4bC9u4D1dtVLyQMXwMfKw4X/8Jx3C7l4r5KCrWGClj5m+8zBoCmlJH84XriljO+Up9NrR4FqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2jNwq0lf; 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="2jNwq0lf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4519C4CEE7; Wed, 18 Jun 2025 11:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244856; bh=y4jBadEmzLfUqCZLOu4im5rHu+w77iwVzOAXNRckp8U=; h=From:To:Cc:Subject:Date:Reply-to:From; b=2jNwq0lf3jITfpCvFrgnJPzxbCT6oY1H5KiYQLvjN1XCWB7GCE0Dd/7RrqQ3okCr7 sS6ufYxQj+uKLa8mmUozKEyT3AieeO2dxk7Ep0RUSgl1JKC0AJBTH2cZLcumIT28Gt q7cLD8DN6x7LGU+wz79VN+zVOnxSkg7QWpB5ZzGw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50057: fs/ntfs3: Fix NULL deref in ntfs_update_mftmirr Date: Wed, 18 Jun 2025 13:02:02 +0200 Message-ID: <2025061848-CVE-2022-50057-6bc4@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=2808; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Wz+WKSfyiqVcaXMxIDj61lrKZ00wRS83pxd4qB/e3/0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBcxJCExTVCmZI/Z2xe9/Z5S37F626bBDaEfmY7V776 vDl52a0dsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEElwZ5ueuPfX/5k9bru9s Kp4F9801ZV+EWjMsOCMsyLDliGTxhnNxCx99MDz9LHVpMwA= 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: fs/ntfs3: Fix NULL deref in ntfs_update_mftmirr If ntfs_fill_super() wasn't called then sbi->sb will be equal to NULL. Code should check this ptr before dereferencing. Syzbot hit this issue via passing wrong mount param as can be seen from log below Fail log: ntfs3: Unknown parameter 'iochvrset' general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] CPU: 1 PID: 3589 Comm: syz-executor210 Not tainted 5.18.0-rc3-syzkaller-00016-gb253435746d9 #0 ... Call Trace: put_ntfs+0x1ed/0x2a0 fs/ntfs3/super.c:463 ntfs_fs_free+0x6a/0xe0 fs/ntfs3/super.c:1363 put_fs_context+0x119/0x7a0 fs/fs_context.c:469 do_new_mount+0x2b4/0xad0 fs/namespace.c:3044 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] The Linux kernel CVE team has assigned CVE-2022-50057 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 5.15.63 with commit 8e8e1a84dac7a3d2b432162a70d7fb6a75960772 Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 5.19.4 with commit bf6089dc01ba3194ab962105d7b85690843c256f Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 6.0 with commit 321460ca3b55f48b3ba6008248264ab2bd6407d9 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-50057 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/ntfs3/fsntfs.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/8e8e1a84dac7a3d2b432162a70d7fb6a75960772 https://git.kernel.org/stable/c/bf6089dc01ba3194ab962105d7b85690843c256f https://git.kernel.org/stable/c/321460ca3b55f48b3ba6008248264ab2bd6407d9