udisks2 must depend on libblockdev-crypto2 and libblockdev-mdraid2 instead of suggests [Can't mount encrypted USB drive after upgrade to bionic]

Bug #1757321 reported by Joe Barnett
132
This bug affects 28 people
Affects Status Importance Assigned to Milestone
udisks2 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

after upgrading to bionic, attempts to mount an encrypted USB drive fail with the error "function bd_crypto_luks_open_blob called but not implemented"

Installing libblockdev-crypto2 and libblockdev-crypto-dev and rebooting appears to have fixed it, but should that be necessary? or at least better documented? (https://www.distrowatch.com/weekly.php?issue=20171113 is the only reference I could find on the error)

[Workaround]
1. Install libblockdev-crypto2
2. Restart udisks:
  $ systemctl restart udisks2

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: udisks2 2.7.6-2ubuntu4
ProcVersionSignature: Ubuntu 4.15.0-12.13-generic 4.15.7
Uname: Linux 4.15.0-12-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
CurrentDesktop: GNOME
CustomUdevRuleFiles: 90-xhc_sleep.rules 70-snap.core.rules
Date: Tue Mar 20 20:28:39 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-08-21 (942 days ago)
InstallationMedia: Ubuntu-GNOME 15.10 "Wily Werewolf" - Alpha amd64 (20150819)
MachineType: Apple Inc. MacBookPro11,4
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.15.0-12-generic.efi.signed root=/dev/mapper/ubuntu--gnome--vg-root ro quiet splash vt.handoff=1
SourcePackage: udisks2
UpgradeStatus: Upgraded to bionic on 2018-03-20 (0 days ago)
dmi.bios.date: 06/05/2015
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBP114.88Z.0172.B04.1506051511
dmi.board.name: Mac-06F11FD93F0323C5
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookPro11,4
dmi.chassis.type: 9
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-06F11FD93F0323C5
dmi.modalias: dmi:bvnAppleInc.:bvrMBP114.88Z.0172.B04.1506051511:bd06/05/2015:svnAppleInc.:pnMacBookPro11,4:pvr1.0:rvnAppleInc.:rnMac-06F11FD93F0323C5:rvrMacBookPro11,4:cvnAppleInc.:ct9:cvrMac-06F11FD93F0323C5:
dmi.product.family: MacBook Pro
dmi.product.name: MacBookPro11,4
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

Revision history for this message
Joe Barnett (thejoe) wrote :
Changed in udisks2 (Ubuntu):
status: New → Confirmed
importance: Undecided → High
status: Confirmed → Triaged
summary: - Can't mount encrypted USB drive after upgrade to bionic
+ udisks2 must depend on libblockdev-crypto2 instead of suggests [Can't
+ mount encrypted USB drive after upgrade to bionic]
tags: added: rls-bb-incoming
description: updated
Revision history for this message
Iain Lane (laney) wrote : Re: udisks2 must depend on libblockdev-crypto2 instead of suggests [Can't mount encrypted USB drive after upgrade to bionic]

I think we need https://bugs.launchpad.net/ubuntu/+source/volume-key/+bug/1754422 for this - I pinged on that bug for the security team to review.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

mdraid support is broken too and requires libblockdev-mdraid2

[ 8.807194] herm udisksd[1407]: failed to load module crypto: libbd_crypto.so.2: cannot open shared object file: No such file or directory
[ 8.807257] herm udisksd[1407]: failed to load module mdraid: libbd_mdraid.so.2: cannot open shared object file: No such file or directory

summary: - udisks2 must depend on libblockdev-crypto2 instead of suggests [Can't
- mount encrypted USB drive after upgrade to bionic]
+ udisks2 must depend on libblockdev-crypto2 and libblockdev-mdraid2
+ instead of suggests [Can't mount encrypted USB drive after upgrade to
+ bionic]
Revision history for this message
Maximilian bloch (maximilian-bloch) wrote :

Installing `libblockdev-crypto2` (and rebooting) worked for me. Thanks @thejoe.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

jibel, ugh, if we need the mdraid plugin, then we need a MIR for libbytesize (as I mentioned on LP: #1735499)

Revision history for this message
Jeremy Bícha (jbicha) wrote :

and a MIR for thin-provisioning-tools I think

Revision history for this message
Bio Mon (biomon) wrote :

This was the first real shock moment today trying the bionic beta - I could not believe how good everything seems to be, but then this really FAT one! Unable to get any files from the backup disks... horrible moment.

Revision history for this message
Stuart Bishop (stub) wrote :

This also affects the Live CD, where attempting to mount encrypted volumes for testing or rescue purposes fails with this rather scary error.

Revision history for this message
seanlano (seanlano) wrote :

I installed libblockdev-crypto2, and now I don't get the error "function bd_crypto_luks_open_blob called but not implemented" - but I now instead get an "Operation not permitted" error. Does anyone else have this issue? My external disk is btrfs formatted, but that shouldn't be the cause, I get the same error even if I put the wrong password in so it seems like it's getting denied somewhere before it can even try to decrypt the disk.

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1757321

tags: added: iso-testing
Will Cooke (willcooke)
tags: added: rls-bb-notfixing
removed: rls-bb-incoming
Revision history for this message
Will Cooke (willcooke) wrote :

This is also being addressed in bug LP: #1754422

Revision history for this message
GizmoChicken (gizmochicken) wrote :

I just want to reiterate that, as mentioned by Stuart Bishop in Comment #8 above, this bug also affects the Ubuntu Live USB/CD.

I've been using an Ubuntu Live USB for accessing LUKS volumes on my systems for years. I hope that the Ubuntu 18.04 Live USB continues to provide this functionality.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package udisks2 - 2.7.6-3

---------------
udisks2 (2.7.6-3) unstable; urgency=medium

  [ Jeremy Bicha ]
  * Update Vcs fields for migration to https://salsa.debian.org/

  [ Iain Lane ]
  * debian/rules, debian/substvars: Recommend libblockdev-crypto2 in Ubuntu
    too - the package is going to main now. (LP: #1757321)
  * d/p/0001-integration-test-Wait-longer-after-the-scsi-debug-CD.patch,
    d/p/0002-integration-test-don-t-error-out-on-an-unknown-distr.patch,
    d/p/0004-tests-Pass-absolute-path-to-targetcli_config.json.patch:
    Cherry-pick patches from upstream or in one case an upstream PR to fix
    testsuite failures. All via Ubuntu.
  * d/p/0003-main.c-Properly-remove-sigint-source.patch: Remove GSource
    properly - the old way was causing crashes.
  * debian/tests/control: Add test-deps on libblockdev-crypto2 and
    targetcli-fb, both of which are required by the testsuite.

 -- Iain Lane <email address hidden> Thu, 19 Apr 2018 13:48:28 +0100

Changed in udisks2 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
seanlano (seanlano) wrote :

I just tried the Live CD daily build for Bionic, I still see the error "Error unlocking /dev/sdc1: Failed to activate device: Operation not permitted (udisks-error-quark, 0)" (see attached screenshot) when trying to unlock a LUKS external disk with the Disks program. This comes up regardless of if I enter the correct or incorrect password.

Revision history for this message
Ian Turner (vectro) wrote :

seanlano, if you boot the live cd and then run "dpkg -l libblockdev-crypto2 | cat", what do you see? How about "dpkg -l udisks2 | cat"?

Revision history for this message
seanlano (seanlano) wrote :

This is what I get:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=========================-============-============-=================================
ii libblockdev-crypto2:amd64 2.16-2 amd64 Crypto plugin for libblockdev

ii udisks2 2.7.6-3 amd64 D-Bus service to access and manipulate storage devices

Revision history for this message
Ian Turner (vectro) wrote :

I think you are experiencing a different issue and recommend you file a new bug.

Revision history for this message
seanlano (seanlano) wrote :

I just tried making a new disk on an 8 GB flash disk, with Ext4 + LUKS, then tried the Live CD again - this time it worked. So, there is something going on with both my 1 TB USB HDD, and also my internal 128 GB SSD, both of which give "Operation not permitted". But the newly created disk does work fine out-of-the-box, so yes I agree I am experiencing a different bug. Thank you!

Revision history for this message
Axel Pospischil (apos) wrote :

Hi,

affects me too after update on 18.04. After installing libblockdev-crypto2 and system restart, I get the error:

"Error unlocking /dev/sdx1. Failed to activate device: Operation not permitted"

I tried a lot of things:

 * Start gnome-disks as root
 * Open Luks and mount via cryptsetup on commandline

Nothing helped. I hope the "fix" will find a way to my pc some times ...

Greets Axel

Revision history for this message
Agustin Covarrubias (agucova) wrote :

Even in 2019 and Ubuntu 18.10 fully updated, I'm getting the exact same error (on gnome-disks and nautilus)

> "Error unlocking /dev/sdb3: Failed to activate device: Operation not permitted (udisks-error-quark, 0)".

The package libblockdev-crypto2 was already installed and installing libblockdev-crypto-dev (and rebooting) didn't help.

Using udisksctl didn't help either:
> udisksctl unlock -b /dev/sdb3
> Passphrase:
> Error unlocking /dev/sdb3: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error unlocking
> /dev/sdb3: Failed to activate device: Operation not permitted

Revision history for this message
Axel Pospischil (apos) wrote :

Hi Agustin, after a long period of fails, I finally at least can mount the drive via commandline script like:

> #!/bin/bash
> sudo cryptsetup luksOpen /dev/sdx# sdx#_crypt

Attention: the number "#" is not always the same. Normally it is for e.g. "/dev/sdb1" something like "sdb5_crypt"

Good luck

Revision history for this message
Zach Davey (sdudexd) wrote :

How do I record this bug as affecting Lubuntu, I think I was told to submit bugs to Lubuntu Packages Team (~lubuntu-packaging), I have no idea how to work launch pad :P

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.