From patchwork Fri Jul 12 01:26:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuxuan Luo X-Patchwork-Id: 1959637 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 4WKv7v258mz1xqc for ; Fri, 12 Jul 2024 11:26:35 +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 1sS53M-0000LA-TT; Fri, 12 Jul 2024 01:26:28 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sS53L-0000Kp-7v for kernel-team@lists.ubuntu.com; Fri, 12 Jul 2024 01:26:27 +0000 Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (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-1.canonical.com (Postfix) with ESMTPS id BC3AD3F0E9 for ; Fri, 12 Jul 2024 01:26:26 +0000 (UTC) Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6b5de421bc6so18588936d6.0 for ; Thu, 11 Jul 2024 18:26:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720747585; x=1721352385; 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=+qywFUon91UoahE4eYiuScmy15VTUoU+GIRhmt3R3fY=; b=EOfoGmIMQIylX42LS4inKoEsJSvVtLBkxiLg9HN2z3IJBPIX0Vu+jZ2iTHWYSEKbMh 8nSrsjzsV7REELDaNaUieKB3RoJB80wOwKOlAYOKNTfC2ed4+/xE9S+NkRcTOPJ/VuCw +HmlQCWAoxDQ2sK9w88oPYbODB/+p1paRA3MG5FEx5PP4k63Dxwaxuoorpg173Zpf4cX f5JsZhaVVMwtn05A0nUOFb5IDfRYfVyQ3H0Z/toi3OaAGYiW0Tlgu1ROyGPvAFsD2FYg lt22IyXgy+Azte1m5VCTE4E6AZM6B6ATSCMdPz18FeMow/GrhYiDINdD96fpLukk/v6u rfCw== X-Gm-Message-State: AOJu0YxMYSgcSTUQ0mywbb53m3JJHcbUVIDzdrUUU6M54Faz/U7mm1+u 2N2M44qYKn+ppy/SbISbrUWx7/yYCEsUUlb0hSLFaheJ1jwRLJXxZEfw8/La6C5xJs2Z9TPgrB8 Evo1+vgH6HXRTQIAWUmEfPiifuRQauUGBgin17Q+VQMfIHEJKKonJtvTO2ge5HA/dMJC+4zPHKb SU2gxiz4/aDg== X-Received: by 2002:a05:6214:e66:b0:6b5:6138:1a54 with SMTP id 6a1803df08f44-6b61c1e3937mr144585166d6.56.1720747584870; Thu, 11 Jul 2024 18:26:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/Jm6TjFfRYYs9aB+4F71RUumZnleYUmy5JLiuo6JJZqqNC69H3qfsu8BKJl6XVM6Qu2g6JQ== X-Received: by 2002:a05:6214:e66:b0:6b5:6138:1a54 with SMTP id 6a1803df08f44-6b61c1e3937mr144585046d6.56.1720747584518; Thu, 11 Jul 2024 18:26:24 -0700 (PDT) Received: from cache-ubuntu.hsd1.nj.comcast.net ([2001:67c:1562:8007::aac:4795]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-447f9b26c9dsm35633861cf.14.2024.07.11.18.26.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jul 2024 18:26:24 -0700 (PDT) From: Yuxuan Luo To: kernel-team@lists.ubuntu.com Subject: [SRU][F/J][PATCH v2 0/1] CVE-2023-52760 Date: Thu, 11 Jul 2024 21:26:20 -0400 Message-Id: <20240712012622.2234811-1-yuxuan.luo@canonical.com> X-Mailer: git-send-email 2.34.1 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] A potential use-after-free may occur in gfs2 file system when unmounting the fs, which put the system's control integrity at risk. [Backport] The fix commit, bdcb8aa434c6 ("gfs2: Fix slab-use-after-free in gfs2_qd_dealloc"), addresses two problems: 1) UAF caused by gfs2_quota_cleanup() not called if not already withdrawn "[otherwise], struct gfs2_sbd will be freed before gfs2_qd_dealloc (rcu callback) has run for all gfs2_quota_data objects". 2) Double-free by calling gfs2_quota_cleanup() twice if in not read-only mode. The second issue is introduced by f66af88e3321 ("gfs2: Stop using gfs2_make_fs_ro for withdraw") while the first one predate in the very old kernels. To solve the first one, only call the gfs2_quota_cleanup() if the gfs2_make_fs_ro() is not called since gfs2_make_fs_ro() calls gfs2_quota_cleanup() as well. [Test] Compile and boot tested only. [Where things could go wrong] Regression might occur when unmounting the fs. Juntong Deng (1): gfs2: Fix slab-use-after-free in gfs2_qd_dealloc fs/gfs2/super.c | 2 ++ 1 file changed, 2 insertions(+) Acked-by: Manuel Diewald Acked-by: Kevin Becker