From patchwork Wed May 17 16:12:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cengiz Can X-Patchwork-Id: 1782775 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=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Ea4EuYsf; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (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 4QLynV6xXxz20dX for ; Thu, 18 May 2023 02:13:01 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1pzJle-0006M7-33; Wed, 17 May 2023 16:12:46 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pzJlb-0006M0-40 for kernel-team@lists.ubuntu.com; Wed, 17 May 2023 16:12:43 +0000 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (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 AD2B63F1A6 for ; Wed, 17 May 2023 16:12:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1684339962; bh=JzIJDC+BCKo2oIAL6YWjYaktA7gk5PouZUhLZWfLtRQ=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=Ea4EuYsfpQjLkXiKRLeG14+9PG6Cq7BJyOSCUTtPSW0wc5QGL6890ImgVVn7y4i+r V96PT5xKpuUXEsn5Y8BE7l3WWopz/QRINSO6qxTNdsCgGD9T8T1y+UqULYJnil1nkh 4+MmYMlNq7HQDSlqRAFEhUEPga3xSs3w/mYd6/IJon2ITEDQ7NZvhhC7LDd2qhfNir HAlyeqq1L2S4vZAyMQ06p4ZfHE6MtqUsNzYDlgyLf9RfmIqOI4ygIUgovXtDv6P0Xs +btp2Fr7ILWacWsFsygVO2w/cfbTMyb9JSp3JKJyX4H4ukPclUULLQrQC7umKsN3gR Q9nvsnLnvAH+Q== Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-50bc456a94dso1017817a12.1 for ; Wed, 17 May 2023 09:12:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684339961; x=1686931961; 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=JzIJDC+BCKo2oIAL6YWjYaktA7gk5PouZUhLZWfLtRQ=; b=T1wSTAVyZDyEDveNyuRtRj+RD6YgZJj1ce3evIBQF4g5s908jSGWLXVfOcU7Vllclz wmXtvTNONPlneVahijsZhKccDQHplXuudb4Gcb0sdSv+GSH650/7RZSDMpfWBcovW3cd VsbbolVfgU/jgpkEMbv6BPidPRLHLs6GQSllgM12db1wGMIgU604b42yaRRyEbeRnJ3x mDUuLpfz6da6WCXN6P1jOUVcAV+Dxhq/QbOK5urjptItodrDIeHCuYM17CWtZ5BjAdm4 ICr75HsRwpo9KwltXPCZUQdSCjk/eIwb3/RvEmg9yQ0AEKaJRUZCL3CRjOFEUx8RQDoT lzZw== X-Gm-Message-State: AC+VfDzWIBHcLBaXGKrthFyN5ywuN73TXKsU9EkgpEX1CFSO+DIX+1c5 qx0B9jnDDtgBIlMI9gBgZLnAvtRqOCrw03VMBXLFvGmUzvN05TmcqbT0vd3U36UtIMM9HgNiJbm WpxXS3iYYtTmOUiJJa/LQh0mJhIQMTjBSRtXalJZ4uBKZFvpKD5W6FAU= X-Received: by 2002:aa7:d593:0:b0:50d:fba2:7265 with SMTP id r19-20020aa7d593000000b0050dfba27265mr2571804edq.16.1684339961500; Wed, 17 May 2023 09:12:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4wTcUIO2uOvwT1aJNM3ppYZSqUW2XjlcROXN78qZGx0bheu+CcGp27FEHQ67P9yu9O8+evZQ== X-Received: by 2002:aa7:d593:0:b0:50d:fba2:7265 with SMTP id r19-20020aa7d593000000b0050dfba27265mr2571792edq.16.1684339961194; Wed, 17 May 2023 09:12:41 -0700 (PDT) Received: from localhost ([82.222.124.85]) by smtp.gmail.com with ESMTPSA id c2-20020aa7c742000000b0050bc13e5aa9sm9356233eds.63.2023.05.17.09.12.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:12:40 -0700 (PDT) From: Cengiz Can To: kernel-team@lists.ubuntu.com Subject: [SRU Focal, Bionic PATCH 0/2] CVE-2022-1184 Date: Wed, 17 May 2023 19:12:26 +0300 Message-Id: <20230517161227.141529-1-cengiz.can@canonical.com> X-Mailer: git-send-email 2.39.2 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 use-after-free flaw was found in fs/ext4/namei.c:dx_insert_block() in the Linux kernel’s filesystem sub-component. This flaw allows a local attacker with a user privilege to cause a denial of service. [Fix] This was tricky. I had to dive deep into other vendors' bugzillas and irc channels to verify if the patches were enough. The fix consists of: ext4: verify dir block before splitting it ext4: avoid cycles in directory h-tree ext4: check if directory block is within i_size The following fixes one of the fixing commits: ext4: fix check for block being out of directory size The following was suggested to be included but I don't know the actual impact: ext4: make sure ext4_append() always allocates new block Out of these five commits, 3 were already in Bionic and Focal. I backported or cherry-picked the missing 2 to Bionic and Focal. [Test case] I ran xfstests that specifically target ext4, with the exception of ext4/054 because it always crashes on both unpatched and patched Bionic and Focal kernels. Other than that, the test results are the same. [Potential regression] High. This needs to be reviewed very carefully. Jan Kara (1): ext4: fix check for block being out of directory size Lukas Czerner (1): ext4: check if directory block is within i_size fs/ext4/namei.c | 7 +++++++ 1 file changed, 7 insertions(+) Acked-by: Andrei Gherzan Acked-by: Tim Gardner