Return-Path: Received: from sonic309-25.consmr.mail.ir2.yahoo.com (sonic309-25.consmr.mail.ir2.yahoo.com [77.238.179.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Wed, 19 Feb 2020 17:05:29 +0100 (CET) From: Quentin Lefebvre Message-ID: Date: Wed, 19 Feb 2020 17:05:01 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 7bit References: Subject: [dm-crypt] Bug in cryptsetup 2.3.0 (BitLocker key-file support) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Dear cryptsetup maintainer, I discovered a functional bug in the recently added BitLocker support (thanks by the way!) Not sure whether it is the place to report it... Summary: cryptsetup 2.3.0 cannot open a bitlk device when I provide a file containing its password (fails with error -2). Command failing: cryptsetup open --type bitlk --key-file /dev/ bitlocker_mapping It is very easy to reproduce, so I don't copy paste the --debug output. I digged in the source code and found the problem in src/cryptsetup.c:543-545, where opt_keyfile_size is used when calling tools_get_key(). The workaround is actually to provide the exact password size on the command line, e.g.: cryptsetup open --type bitlk --keyfile-size 55 --key-file /dev/ bitlocker_mapping Sorry not to provide a patch but I'm sure you will make it work in next releases. Hope this report helps a bit. Regards, Quentin