Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CD6D433042; Tue, 21 Jul 2026 20:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784664086; cv=none; b=UPqHraC/WTWVVzo14kJlRWsqs0PMA+WGy/P6A1BeT7++ONfghMRtVsLKnyt7QoOnUDhiYIp+4QHVjmpIK8I3LtGTSvNRNab45XvYy3LHYsj1RNanNHfrTE4C+LKs7h1GBTJCLy6hOhiC69Cv+WZ/p/Efvy0iXUeaQ9LQtXUhC8o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784664086; c=relaxed/simple; bh=B/OuEV8vp9nYGRp5nn/d5pAIJvieZr65NxUtFYRg3to=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YKVXiNsZXNC1oiqnnoxlm1yN0U6Bo3BW7RHrGs0W2aEthGVMkT6OpchNa33GagUA3+47KZZhxZ2mwaIT0tobgoS7jy7lpMd1mGkuHNKSuNAc6yRpHYMP0ZLF15bCRz58Qnhgbe13RrU8sd3uq0Cq4YfPh6nheWUYZebAzknjTnU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IDjfGloT; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IDjfGloT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD8FF1F000E9; Tue, 21 Jul 2026 20:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784664085; bh=av9+wuAJzCbnpHBMWRvYpmwaBA0vZ0FDW/TDR+7w9fU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IDjfGloTgV9xhrrbEqG/T8EGHQ3p94ZMWMbAFNSdENqaOI9S8n5+N218WgS9m9v1P uV/zS3D8gXzlKg58jUC6kimkUuuo048ldJ6a+1eMH8gkqMI1eBNYcYM/dUVZpfGoWT kds3L5nRIUugKPwvB75BkVa7S2w8kVB3knTw/8XI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mikulas Patocka Subject: [PATCH 6.12 1013/1276] dm-verity: increase sprintf buffer size Date: Tue, 21 Jul 2026 17:24:16 +0200 Message-ID: <20260721152508.673483373@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikulas Patocka commit 88dd117c92a142253fb7a17e791773902b3babc6 upstream. The prefix "DM_VERITY_ERR_BLOCK_NR" is 22 chars. Add '=', one digit for type, ',', up to 20 digits for a u64 block number, and a NUL terminator: that's 46 bytes. The buffer is 42 bytes. For block numbers >= 16 decimal digits (devices larger than ~16 EB with 4K blocks), snprintf silently truncates the uevent environment variable. Signed-off-by: Mikulas Patocka Assisted-by: Claude:claude-opus-4.6 Fixes: 65ff5b7ddf05 ("dm verity: add error handling modes for corrupted blocks") Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-verity-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/md/dm-verity-target.c +++ b/drivers/md/dm-verity-target.c @@ -26,7 +26,7 @@ #define DM_MSG_PREFIX "verity" -#define DM_VERITY_ENV_LENGTH 42 +#define DM_VERITY_ENV_LENGTH 46 #define DM_VERITY_ENV_VAR_NAME "DM_VERITY_ERR_BLOCK_NR" #define DM_VERITY_DEFAULT_PREFETCH_SIZE 262144