From patchwork Fri Jul 28 19:40:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuxuan Luo X-Patchwork-Id: 1814419 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=PNa0Wf6g; 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 4RCHzf4XSZz1ydx for ; Sat, 29 Jul 2023 05:40:30 +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 1qPTK2-00068g-R4; Fri, 28 Jul 2023 19:40:22 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qPTK0-00068R-NS for kernel-team@lists.ubuntu.com; Fri, 28 Jul 2023 19:40:20 +0000 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.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 1F88A3F189 for ; Fri, 28 Jul 2023 19:40:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1690573220; bh=cmBWlulM6eKez7f2sDCpNWAiSRgBhhykRup16Ry+VA0=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=PNa0Wf6g6EDIYeGTUje1eoUoPNHLyI9UVkvrhjw7QrLaTr7xwwjmWSahf2FFzVjTt d7BRu2wI2zIBZNNbWWuroThNkrLy+SVaJkiwQ1Insv1TBfoA++gMPgWXtXMgVn/Qv9 xbSIZbftwEDOY3mVfWIJiSP+zpwmQVp14s/tduIUKOVfzPzcilyendtNzLzwPeN4jG GRWAPNako7UfLgatSx0NP8ltoTIMet50pmbRRXdrQT1ezvF9g4JextVmLKUiqj8cNn 4OS0cebe0r0D0Nq6LoeOgqFdfkMw+CPJuJ2w9J12Je/uqLeydjZPRKvFyCAlBGrfg+ N9R80kmn6/10A== Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-56c7404fafdso1052398eaf.1 for ; Fri, 28 Jul 2023 12:40:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690573218; x=1691178018; 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=cmBWlulM6eKez7f2sDCpNWAiSRgBhhykRup16Ry+VA0=; b=ccOxG2iYxa1au7ciNVkB+Bm2GgXH+lYGf6szjlvgbekO7kYIAYhJXgpnzoqS/HhcLg OUo6VcMDZH/FxUpUuXmxsslZW/wpRQ/PHhQ0gt7I7xggFNdKBtTAjuFXLn0RAciQ/HbU H/9u0EW73Jt0neQT5nL6wv0GwzbBLICDgLURldMriNdXwirOv0eYNvJrWnw/89SgTwed eV/tmSQZ4IJU8K6EwGsfrMLsrnTjpjvt5q8Q5Gr0PoY1H78CAv27C1iwyHkdIYjCymQR AszKewRqWnCTE6EGvjNPqrL2sOuuzsStbiOpzkf4V/aM4fEk+aDlF9/s6Zz0xnuzcbUM GMdg== X-Gm-Message-State: ABy/qLaVKrcdS+RSyEyykPinoNHuJvpF1aGU8uAUqeDZUYXVk1kzGtLw NqZI9Ig1t2rmnvzdqpyhl14IjVg3fXQsT6OdVjbDeSz7QnuO4jVETI9+WmcFcnH8cyvteNatIFC 6kfFu0UxvFr7p+JY5JPrSSgGO9dbeFxOWZCcxvbmmd3svSw5KpJjl X-Received: by 2002:a05:6359:3514:b0:137:89ac:20d4 with SMTP id un20-20020a056359351400b0013789ac20d4mr2486388rwb.18.1690573218581; Fri, 28 Jul 2023 12:40:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlHi1YrxZi6V8rMm62MMbZEiy0YCJ0N0mnUbXwzpmuhSD5hsRKjSCO2JGfVaek7nhtVJTdch5Q== X-Received: by 2002:a05:6359:3514:b0:137:89ac:20d4 with SMTP id un20-20020a056359351400b0013789ac20d4mr2486370rwb.18.1690573218201; Fri, 28 Jul 2023 12:40:18 -0700 (PDT) Received: from cache-ubuntu.hsd1.nj.comcast.net ([2601:86:200:98b0:da04:6059:8f11:999b]) by smtp.gmail.com with ESMTPSA id c17-20020a0cf2d1000000b0063d252a141dsm1476055qvm.116.2023.07.28.12.40.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 12:40:17 -0700 (PDT) From: Yuxuan Luo To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal][PATCH 0/1] CVE-2023-2269 Date: Fri, 28 Jul 2023 15:40:15 -0400 Message-Id: <20230728194016.91196-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 denial of service problem was found, due to a possible recursive locking scenario, resulting in a deadlock in table_clear in drivers/md/dm-ioctl.c in the Linux Kernel Device Mapper-Multipathing sub-component. [Backport] Clean cherry pick. [Test] Tested against the following script to verify that the verity functionality is not broken and ioctl is still working as intended: ```bash IMG_SIZE=50M VERITY_DEV='' HASH_DEV='' TARGET_DIR=/mnt/dmtest ROOT_HASH='' PARAM='' # Prepare two loop devices truncate -s $IMG_SIZE verity.img hash.img losetup -f verity.img VERITY_DEV=$(sudo losetup -j verity.img | awk -F: '{print $1}') losetup -f hash.img HASH_DEV=$(sudo losetup -j hash.img | awk -F: '{print $1}') # Create the verity device ROOT_HASH=`veritysetup format $VERITY_DEV $HASH_DEV | tail -n 1 | awk '{print $3}'` veritysetup create vroot $VERITY_DEV $HASH_DEV $ROOT_HASH # Reload the verity device PARAM=$(sudo dmsetup table | awk '{ret = $2 " " $3; print ret}') dmsetup suspend vroot # Expect this command to fail dmsetup reload vroot --table "$PARAM linear $VERITY_DEV 0" ``` [Potential Regression] Expect low regression potential. Mike Snitzer (1): dm ioctl: fix nested locking in table_clear() to remove deadlock concern drivers/md/dm-ioctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) Acked-by: Tim Gardner Acked-by: Cengiz Can