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 CA35E30BF6D for ; Mon, 15 Sep 2025 14:25:22 +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=1757946322; cv=none; b=Q59AvbsH95w/2X+/LMnrS5+RSvkWCJPrgdttIRG0NQd/EA2rexfGzNGG/avs5Nx5z5iso6mLQC95EhGdF9yoenZcZqn1NQn5UiORWEcC/qXnN3LfbqIKfqSsFe1/ifEKG4PH5J0MGYFzQKu6t9NPjUTiM3VPKglH5P5UiRcaM4g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757946322; c=relaxed/simple; bh=SDXYIs9X+0tJ25VuHyeXzVC3arfVxps74ZhQKI4aMa0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bypZG5K65JDgPgvirGETGXE9rGUc35lwFumz9Scc1T2YnZqWQj1N/bOHNV4B4pIyuhZB4vJedssgfZz4DjXZ1IDIpGpkaXGJO4ftlWKC29R3zC7gGKJ4KuliLzw/kfmes8nHY+fe1E6tvUZwxd2OYOhb0cZ+Ky/J49oQeHlnDS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Hx42qtBo; 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="Hx42qtBo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBE6CC4CEF1; Mon, 15 Sep 2025 14:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757946322; bh=SDXYIs9X+0tJ25VuHyeXzVC3arfVxps74ZhQKI4aMa0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Hx42qtBo3i1RZrtW7+OSn4ZJu/i+SBL7qn618sZdq8KVwfpKPspvJmlpg1bNNT1P4 SWGwkqLq/8ffRfUfO389J/3R8WepLqQu3RW4kj7D6rmEJvnc7d3n80wQPOYiaADJ1G WbkXFIZg4l1Qh+wF4xgQb/F/R+/RS2tjQTPC7QKA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50270: f2fs: fix the assign logic of iocb Date: Mon, 15 Sep 2025 16:21:12 +0200 Message-ID: <2025091505-CVE-2022-50270-5b28@gregkh> X-Mailer: git-send-email 2.51.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=3638; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=CyWEZmXCzbWDlti2JVISR0lSzHuMhYs1iypQsTgi03M=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknFC7O2Nw/g1VN695J0ePLpXkTvNKOyJUErdnAXmamc mPmV1W1jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI7DUM8x3/tGS2VBffOXhF bOVpDvW/83WWyjDMU42SehO5+IazYGyJi1fIYaVTW7jZAA== 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: f2fs: fix the assign logic of iocb commit 18ae8d12991b ("f2fs: show more DIO information in tracepoint") introduces iocb field in 'f2fs_direct_IO_enter' trace event And it only assigns the pointer and later it accesses its field in trace print log. Unable to handle kernel paging request at virtual address ffffffc04cef3d30 Mem abort info: ESR = 0x96000007 EC = 0x25: DABT (current EL), IL = 32 bits pc : trace_raw_output_f2fs_direct_IO_enter+0x54/0xa4 lr : trace_raw_output_f2fs_direct_IO_enter+0x2c/0xa4 sp : ffffffc0443cbbd0 x29: ffffffc0443cbbf0 x28: ffffff8935b120d0 x27: ffffff8935b12108 x26: ffffff8935b120f0 x25: ffffff8935b12100 x24: ffffff8935b110c0 x23: ffffff8935b10000 x22: ffffff88859a936c x21: ffffff88859a936c x20: ffffff8935b110c0 x19: ffffff8935b10000 x18: ffffffc03b195060 x17: ffffff8935b11e76 x16: 00000000000000cc x15: ffffffef855c4f2c x14: 0000000000000001 x13: 000000000000004e x12: ffff0000ffffff00 x11: ffffffef86c350d0 x10: 00000000000010c0 x9 : 000000000fe0002c x8 : ffffffc04cef3d28 x7 : 7f7f7f7f7f7f7f7f x6 : 0000000002000000 x5 : ffffff8935b11e9a x4 : 0000000000006250 x3 : ffff0a00ffffff04 x2 : 0000000000000002 x1 : ffffffef86a0a31f x0 : ffffff8935b10000 Call trace: trace_raw_output_f2fs_direct_IO_enter+0x54/0xa4 print_trace_fmt+0x9c/0x138 print_trace_line+0x154/0x254 tracing_read_pipe+0x21c/0x380 vfs_read+0x108/0x3ac ksys_read+0x7c/0xec __arm64_sys_read+0x20/0x30 invoke_syscall+0x60/0x150 el0_svc_common.llvm.1237943816091755067+0xb8/0xf8 do_el0_svc+0x28/0xa0 Fix it by copying the required variables for printing and while at it fix the similar issue at some other places in the same file. The Linux kernel CVE team has assigned CVE-2022-50270 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit bd984c03097b8e9b7500cba7378040ac1c697dbb and fixed in 6.0.16 with commit d555aa37566c5c3728f2e52047a9722eae2aed93 Issue introduced in 5.17 with commit bd984c03097b8e9b7500cba7378040ac1c697dbb and fixed in 6.1.2 with commit b4244ca341ea95c52ee8fa93d04f5af3e584dd37 Issue introduced in 5.17 with commit bd984c03097b8e9b7500cba7378040ac1c697dbb and fixed in 6.2 with commit 0db18eec0d9a7ee525209e31e3ac2f673545b12f 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-50270 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: include/trace/events/f2fs.h 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/d555aa37566c5c3728f2e52047a9722eae2aed93 https://git.kernel.org/stable/c/b4244ca341ea95c52ee8fa93d04f5af3e584dd37 https://git.kernel.org/stable/c/0db18eec0d9a7ee525209e31e3ac2f673545b12f