mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: Shukai Ni <shukai.ni@kuleuven.be>
Cc: agk@redhat.com, snitzer@kernel.org, bmarzins@redhat.com,
	 gmazyland@gmail.com, dm-devel@lists.linux.dev,
	 linux-kernel@vger.kernel.org,
	Jo Van Bulck <jo.vanbulck@cs.kuleuven.be>
Subject: Re: [PATCH 1/1] dm-integrity: replace forgeable discard filler with a keyed sector marker
Date: Mon, 27 Jul 2026 18:09:20 +0200 (CEST)	[thread overview]
Message-ID: <4ab87b60-6d97-9507-8a8a-7a273021e8de@redhat.com> (raw)
In-Reply-To: <20260727134841.1109615-2-shukai.ni@kuleuven.be>



On Mon, 27 Jul 2026, Shukai Ni wrote:

> The discard-block check in dm_integrity_rw_tag() treats a stored tag
> of all 0xf6 bytes (DISCARD_FILLER) as proof a block was discarded and
> skips HMAC verification. allow_discards is only accepted in
> dm-integrity's standalone mode. An attacker with raw write access to
> the backing device, but without the integrity key, can stamp any block
> with an all-0xf6 tag and have it served as authentic.
> 
> Replace the constant filler with a keyed checksum of (salt || sector)
> and no block payload, computed by integrity_discard_checksum().
> 
> Fixes: 84597a44a9d8 ("dm integrity: add optional discard support")
> Co-developed-by: Jo Van Bulck <jo.vanbulck@cs.kuleuven.be>
> Signed-off-by: Jo Van Bulck <jo.vanbulck@cs.kuleuven.be>
> Signed-off-by: Shukai Ni <shukai.ni@kuleuven.be>

Hi

This breaks backward compatibility for existing volumes. I would add a new 
option "allow_discards_keyed" that enables this functionality (and store 
this option also as a flag in the superblock, so that it can't be turned 
off).

Mikulas


      reply	other threads:[~2026-07-27 16:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 13:48 [PATCH 0/1] " Shukai Ni
2026-07-27 13:48 ` [PATCH 1/1] " Shukai Ni
2026-07-27 16:09   ` Mikulas Patocka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ab87b60-6d97-9507-8a8a-7a273021e8de@redhat.com \
    --to=mpatocka@redhat.com \
    --cc=agk@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=gmazyland@gmail.com \
    --cc=jo.vanbulck@cs.kuleuven.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shukai.ni@kuleuven.be \
    --cc=snitzer@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®