Re: Partition incorrectly identified as LUKS

Milan Broz <[email protected]> Fri, 12 Dec 2025 08:35:44 +0100
Newsgroups org.kernel.vger.util-linux
Message-ID <[email protected]>
On 12/12/25 12:24 AM, Anthony Rossomano wrote:
> Make sure we’re on the same page. This partition is properly wiped
> and formatted as XFS. There are LUKS encrypted squashfs image files
> stored in the partition. These images are updated periodically. The
> issue occurs when secondary LUKS signature in one of the image files
> winds up at offset on disk checked by libblkid.

This just cannot happen until there is a bug in libblkid
(which should check offset) or something different happens.
The offset checking patch was added later, perhaps your distro did not backport the patch.

LUKS1 must be on offset 0.

LUKS2 is designed exactly to prevent this to happen by checking
header offset in on expected location form device start.

If upstream util-linux misdetects LUKS, then please send a testing image somewhere.

Thanks,
Milan