From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 99BB98002A for ; Thu, 19 Nov 2026 01:10:30 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AJ19HUZ031337; Thu, 19 Nov 2026 04:09:17 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AJ19HUZ031337 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1795050559; bh=g744qfnxUZ6HkSXnoUlJJWVi1uc+SnSdFPEDjcgU7dw=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=l3UT6TfiqPII2FslMgQU03MP7/EDIAjZSAcrGqMZum+kdCrRVC2i5Lxwk6P9zCe08 6h2I4lhlJm0fqaiybpsmZLYA+GzvJd6QEunz31YoWsa7+TlXxMbG/va4C48m0r4rb+ zd6OAvDB095JhQC/IQEE7o6ShVTMCnhUdGgm2wIzllKHurzlwsuY7Gm/KjQoOaKh9/ eoouOCTgcmoZj3ZgA3BuUy/GKs+aEymP1IJ8/Jae01jK2GEZ2l2o7s7SfOv5Tr/uAg usTLzvUa3/j0F8VQatIwpiqEHUSvCeIlkqzAoJyLFiYWUx85zbLDPxqv7HW7WOeSuv LwaXUiBDeBydA== Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AJ196op031314 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 19 Nov 2026 04:09:07 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AJ196op031314 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="L1jsMjDC" Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4bb68d624baso14998125e9.2 for ; Wed, 18 Nov 2026 17:09:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHGOFooZ5O4YcSj0gyOH6E8xOk8A/+wRGp+Cy/eDC0Q7oIV1fVeA0tlM269Ri/wEY6SM13Uzg==@openvz.org X-Gm-Message-State: APuU4Z+lHeHaZeHyEl+DXToHNcAh2kQOu6ZLE2q/NwmDV3SLk3KAZ7+L 2YW7co4nJ3OAf4hEOyTbssHSN4XXYg3OVPNMp62ToLW4QaKvimiICphAlo3c1eBjdf4zegujsOs SHsejixrBd/M04fAiY9y8ve+OTqsSrQEd6JmKaup53RGbuA87R/C//A== X-Gm-Gg: AYBFou3t6q/JNgLk9nHKgeKf25IhNdNU0SnQfLxGMEVssKxv80z9tWrlrb9mLqyh2lP xoqdyR3Q75cqhLN7yYBCXBudB6fgjseN2y4NzdsrMiDXLoaTa8P/jgRbYO8grTT/yE6C+7nXu9E 66DUA5Emh0l3RSMOZfecVkh0E3WoFCiWVGBY1NmCjk8G2CaPCuG232inbiKLCV6oSGXjqP33eDU LHaY4Qs+8y8iksjhZbFeDEKU9bJere/2kr1IjBNAf/ceHhwRWrEbdCdcU8+z2jJnVS5k9iHxGWc XecRTDj+pw== X-Received: by 2002:a05:600c:4f05:b0:4bb:73ad:c1f0 with SMTP id 5b1f17b1804b1-4bb7da21b8emr93936085e9.23.1795050546403; Wed, 18 Nov 2026 17:09:06 -0800 (PST) X-Received: by 2002:a05:600c:4f05:b0:4bb:73ad:c1f0 with SMTP id 5b1f17b1804b1-4bb7da21b8emr93935915e9.23.1795050546050; Wed, 18 Nov 2026 17:09:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795050546; cv=none; d=google.com; s=arc-20260327; b=YInXp193A8olkRYy00xCkt6aUHB1TLV6DbHdZwTkLvI4yRkFqYpktHH1BqIm4ESLJL iDw+M3+hOkixUv2003PTclmmtIHxxqPQsi2+l0g9x5uuGENa+SkKsgctioTVFZAXApy2 fjCvBc8H8BmUP5kCT0o7HMr8NZ6fWD66ob4MI31kUhcB3uGbDHqXWnW1W29yVBpt3JRm lSVauHelzUFfCbat9jPa/pLMfkY8OL1fLWxFD6/bOWDIlUsTD8/ttqMUnLsLOrhYRiry wdW75mY6JzXpqnjmPqvzI+MQ8dT0vKoE/uNv7hAhEeoFDhhHBayQ3Altmi1F+/tnQDt1 ztyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=R8HPZpXtYEqdtaLTeAbZ5oBx6gs1sY4Tafb6PoGiGiE=; fh=2tnzwFkFKohcWyXZFRUtq+8bNyn7DTdupOGMyBEFeqg=; b=h5NBHOfOGmrk9q9oXPgjw4loMfNkW/IXpK4uxr8pXEWUw+Y/E32pVO1r8s0Lh7njqy 8alBX9GKmmrULh0kTwHmfwtR779eY3XVKRMxtGWrvyhDE6E+y8JsrQQlXCAqs2941OdR qMNT9CFOO9Mkym5tJOBBuIGun8YPzPg8iqzMQGaTGb2p1ofJCrr4X0DVdYNzO89Z/Loh eKLfHPmCCqC1AwEB4KOcAU+2IHG0DMrbjELEYbBTg66lYBRoP1XfKrpcxBSwH4L+D+9H cg+bR419skoFvEyFkQHqsUTv6Ee92HU8YDKSvjPNm/u74navFc1l8Q4vxlx8VjqRj0kd ul3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=L1jsMjDC; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-4a67332f4fdsor978592f8f.1.2026.11.18.17.09.06 for (Google Transport Security); Wed, 18 Nov 2026 17:09:06 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f as permitted sender) client-ip=2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=L1jsMjDC; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1795050545; x=1795655345; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=R8HPZpXtYEqdtaLTeAbZ5oBx6gs1sY4Tafb6PoGiGiE=; b=L1jsMjDCC/Yhe5RNyQjBJVHLazpKHuBqTiFcIhcJYDDOfIR/72CZeFXk8Bs/vDgZON WLlRCY97yF82kLDdk4v+o+C4eP2CSwuI92dUtguuYVjr+PKWsRZ7AYbskLxDSio3ADRq OOQxABwcaD2zedFy6hOgRJ7nQsM6K2egOABDmb28y+PTeZKEMLQ4R2iP1Dg3wlkz3fy5 CZthopPHUwLUr2sauVeoxf+WGRleQNiP70TmgDWSPlUINoZQokW9YG7AnTu8GobE0Yyu UNdYrkw1Oo02nTieSm4GJ5TIRxQtd85s2+Ox++5FiEJvT/OJshQa13MD9QP5abz2zGXe ksAw== X-Forwarded-Encrypted: i=1; AL+hErEdqOyeqIgR9dLJTfb+ZG9ZuZ2OUVr5ZvcV2hx1OdqnfkR5OIIcSSg03aPJqeHrmkXbyvdg1Q==@openvz.org X-Received: by 2002:a05:6000:25f2:b0:4a5:8f40:a644 with SMTP id ffacd0b85a97d-4a639475320mr9984826f8f.9.1795050545603; Wed, 18 Nov 2026 17:09:05 -0800 (PST) Received: from artemis.sw.ru ([2a06:5b06:b600:300:8c09:3cc3:6efa:ac1f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4a65560b2a1sm7266442f8f.32.2026.11.18.17.09.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2026 17:09:04 -0800 (PST) From: "Denis V. Lunev" To: alexander.ivanov@virtuozzo.com, vasileios.almpanis@virtuozzo.com Date: Thu, 19 Nov 2026 02:08:54 +0100 Message-ID: <20261119010854.4107497-5-den@openvz.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261119010854.4107497-1-den@openvz.org> References: <20261119010854.4107497-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.2 4/4] dm-qcow2: refuse an ext_l2 entry with allocated subclusters and no cluster X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Denis V. Lunev An extended L2 entry with a zero cluster offset and allocation bits set is invalid, and qemu reports it as corruption. parse_l2() accepts it, and I/O to those subclusters then goes to cluster 0, where the image header lives. A failed L2 writeback could leave such entries on disk before the previous fixes, so images may already carry them. Fail I/O to such a cluster with -EIO and log the entry. qemu fails only the invalid subclusters, but the entry is corrupt either way. https://virtuozzo.atlassian.net/browse/VSTOR-154310 Feature: dm-qcow2: block device over QCOW2 files driver Signed-off-by: Denis V. Lunev --- drivers/md/dm-qcow2-map.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c index fedf9ac4e6e3..89e569d09133 100644 --- a/drivers/md/dm-qcow2-map.c +++ b/drivers/md/dm-qcow2-map.c @@ -1979,6 +1979,12 @@ static loff_t parse_l2(struct qcow2 *qcow2, struct qcow2_map *map, if (WARN_ON_ONCE(all_zeroes || (ext_l2 & (ext_l2 >> 32)))) goto out; + if (!pos && (u32)ext_l2) { + pr_err_ratelimited(QCOW2_FMT("invalid ext_l2 entry %u in page %llu"), + qcow2_device_name(qcow2->tgt->ti), + l2->index_in_page, l2->md->id); + goto out; + } /* * Note, that if "l2->index_in_page" is changed, -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel