From patchwork Tue Oct 1 16:49:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Massimiliano Pellizzer X-Patchwork-Id: 1991641 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XJ3p926N9z1xtg for ; Wed, 2 Oct 2024 02:50:09 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1svg4X-00041q-DY; Tue, 01 Oct 2024 16:50:01 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1svg4V-00040u-O4 for kernel-team@lists.ubuntu.com; Tue, 01 Oct 2024 16:49:59 +0000 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 400153F140 for ; Tue, 1 Oct 2024 16:49:59 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-42cb89fbb8cso33004035e9.0 for ; Tue, 01 Oct 2024 09:49:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727801398; x=1728406198; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jTMkABpj8jvwFBFqd+7ncxmu50VvxJx7Dnb+H884skE=; b=M2Jw3teEohAgm8zqPX/Y4LXKsGJiJIk1yzOaO48QB7sAUqAEAumDleUx8DvduNw/wB XZKvyGiVH4vi8pMPh6rV43m0fph3fa5+KV4CBRjZMNkCJZYw8uPv98R7WNy5rxm2CNka zJSPsU/y3oMZjHBN1p7atDmwJGhHe3xHNTrEDUb9UA4CytSNbb28RoMmydmiFaXYpeUp pkMN7JFLexTBbCyLtGBQWstnTtGjQl2Lc2pgvlwQFt0JM71QXX5SfXz7GCl5cwrAQtH/ YX0iWJFBb1oZu74SRrA5vbZydKzFmR22zIH42AO7y1vzD+nHW9SBTjMxFnUFcSKWLg+w bfzA== X-Gm-Message-State: AOJu0YzDcP5yIZgD389zO22x1fyYM1KwoEXXFDnUZt4nuECLAuCw5DKv UDtQRLUKa9h7ZAv2nLDtTE5ExEtWh5o3brBwShJm7ZBWA57/7NH+NwscZEnb+yAQ/mKo6y76SG0 wARJcQlNpUEK+Qh6eMzy9DU/Aan99y9/4XxGUFIChIbzwZ0WYe5xAiJ+zy7yPaxY1mAeEqcsL0T LU8W2QbhFyLA== X-Received: by 2002:a05:600c:4714:b0:42c:a6da:a149 with SMTP id 5b1f17b1804b1-42f777ec710mr1035945e9.25.1727801398564; Tue, 01 Oct 2024 09:49:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFTxJEf+oQyGvsnrCDmuvqBiBpFPS965dfeBPjl8cNN+jbBRsP1ygq8idW4S/fXPMbPPJha+Q== X-Received: by 2002:a05:600c:4714:b0:42c:a6da:a149 with SMTP id 5b1f17b1804b1-42f777ec710mr1035775e9.25.1727801398190; Tue, 01 Oct 2024 09:49:58 -0700 (PDT) Received: from framework-canonical.station (net-93-71-67-9.cust.vodafonedsl.it. [93.71.67.9]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f57dec169sm138504195e9.21.2024.10.01.09.49.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 09:49:57 -0700 (PDT) From: Massimiliano Pellizzer To: kernel-team@lists.ubuntu.com Subject: [SRU][F/J 0/2][N 0/1][PATCH] CVE-2024-44942 Date: Tue, 1 Oct 2024 18:49:47 +0200 Message-ID: <20241001164952.58114-1-massimiliano.pellizzer@canonical.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" [Impact] Add sanity check on F2FS_INLINE_DATA flag in inode during garbage collection. [Fix] Noble: Cherry picked the fix commit from linux-6.10.y Jammy: Backported both a prereq and the fix from linux-6.6.y Focal: Backported both a prereq and the fix from linux-6.6.y Bionic: In progress Xenial: In progress [Test Case] Compile and boot tested. Moreover tested a f2fs partition using the command: stress-ng --hdd 4 --hdd-ops 200000 --iomix 4 --timeout 120s --temp-path /path/to/f2fs [Where problems could occur] The fix affects the f2fs filesystem. An issue with this fix may lead to kernel crashes, particularly during the garbage collection process. Users may also notice filesystem inconsistencies and data corruption. Chao Yu (2): f2fs: support printk_ratelimited() in f2fs_printk() f2fs: fix to do sanity check on F2FS_INLINE_DATA flag in inode during GC fs/f2fs/dir.c | 5 ++--- fs/f2fs/f2fs.h | 38 ++++++++++++++++++++++---------------- fs/f2fs/gc.c | 10 ++++++++++ fs/f2fs/super.c | 11 ++++++++--- 4 files changed, 42 insertions(+), 22 deletions(-)