[Kernel-packages] [Bug 1986623] Re: cryptsetup fails to decrypt root partion during boot

2023-02-19 Thread Gary Brainin
It seems like my problem may have been a different underlying cause with
similar symptoms.

In my case, the entry in /etc/crypttab didn't match the location of the
encrypted partition.  Partition is on sda3, but /etc/crypttab read:

sda6_crypt UUID={uuid} none luks,discard

It appears that when the initramfs image is generated (as when a new
kernel is installed, but also on other updates), a mismatch between the
naming in /etc/crypttab and the actual partition causes an error (which
of course I didn't see) such that the file in the initramfs (located at
/cryptroot/crypttab) was empty (zero bytes).  This lack of a file is
what causes the boot process to hang.

Correcting /etc/crypttab to:

sda3_crypt UUID={uuid} none luks,discard

solves the problem.  Of course, if your initramfs is already honked it
needs to be regenerated:

sudo update-initramfs -u

But future updates should proceed normally.  Thanks to everyone who
provided pointers/thoughts that helped me track this down.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1986623

Title:
  cryptsetup fails to decrypt root partion during boot

Status in cryptsetup package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  During boot, cryptsetup fails to decrypt the root partition in a,
  seemingly, non-deterministic fashion. I know that the password is
  correct and that the keymap is not a fault either, because I have
  specifically chosen the very weak password "123456" for testing
  purposes. A hardware defect seems also rather unlikely as this
  behavior does not affect other Linux distributions or FreeBSD. Earlier
  Ubuntu versions do not seem to be affected either, as this bug appears
  to have been introduced during a kernel update in 20.04 and persists
  throughout 20.04-22.04. Unfortunately I cannot pinpoint the exact
  kernel update that introduced this bug. I have appended the output of
  cryptsetup when manually called from the initramfs shell. Here the
  second attempt succeeded in decrypting the root partition, however, it
  usually takes a lot more attempts to do so.

  As for some additional information, I can decrypt the same luks
  partition from a live USB without any problems whatsoever.

  echo 123456 | cryptsetup open --type luks --debug /dev/nvme0n1p3 
nvme0n1p3_crypt
  # cryptsetup 2.4.3 processing "cryptsetup open --type luks --debug 
/dev/nvme0n1p3 nvme0n1p3_crypt"
  # Running command open.
  # Locking memory.
  # Installing SIGINT/SIGTERM handler.
  # Unblocking interruption on signal.
  # Allocating context for crypt device /dev/nvme0n1p3.
  # Trying to open and read device /dev/nvme0n1p3 with direct-io.
  # Initialising device-mapper backend library.
  # Trying to load any crypt type from device /dev/nvme0n1p3.
  # Crypto backend (OpenSSL 3.0.2 15 Mar 2022 [default]) initialized in 
cryptsetup library version 2.4.3.
  # Detected kernel Linux 5.15.0-46-generic x86_64.
  # Loading LUKS2 header (repair disabled).
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Trying to read primary LUKS2 header at offset 0x0.
  # Opening locked device /dev/nvme0n1p3
  # Verifying locked device handle (bdev)
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(on-disk)
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(in-memory)
  # Trying to read secondary LUKS2 header at offset 0x4000.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(on-disk)
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(in-memory)
  # Device size 497776852992, offset 16777216.
  # Device /dev/nvme0n1p3 READ lock released.
  # PBKDF argon2id, time_ms 2000 (iterations 0), max_memory_kb 1048576, 
parallel_threads 4.
  # Activating volume nvme0n1p3_crypt using token (any type) -1.
  # dm version   [ opencount flush ]   [16384] (*1)
  # dm versions   [ opencount flush ]   [16384] (*1)
  # Detected dm-ioctl version 4.45.0.
  # Detected dm-crypt version 1.23.0.
  # Device-mapper backend running with UDEV support enabled.
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  No usable token is available.
  # STDIN descriptor passphrase entry requested.
  # Activating volume nvme0n1p3_crypt [keyslot -1] using passphrase.
  # dm versions   [ opencount flush ]   [16384] (*1)
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  # Keyslot 0 priority 1 != 2 (required), skipped.
  # Keyslot 1 priority 1 != 2 (required), skipped.
  # Trying to open LUKS2 keyslot 0.
  # 

[Kernel-packages] [Bug 1986623] Re: cryptsetup fails to decrypt root partion during boot

2023-02-18 Thread Gary Brainin
(Correction: previously it asked to decrypt sda3_crypt, not /dev/sda3.)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1986623

Title:
  cryptsetup fails to decrypt root partion during boot

Status in cryptsetup package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  During boot, cryptsetup fails to decrypt the root partition in a,
  seemingly, non-deterministic fashion. I know that the password is
  correct and that the keymap is not a fault either, because I have
  specifically chosen the very weak password "123456" for testing
  purposes. A hardware defect seems also rather unlikely as this
  behavior does not affect other Linux distributions or FreeBSD. Earlier
  Ubuntu versions do not seem to be affected either, as this bug appears
  to have been introduced during a kernel update in 20.04 and persists
  throughout 20.04-22.04. Unfortunately I cannot pinpoint the exact
  kernel update that introduced this bug. I have appended the output of
  cryptsetup when manually called from the initramfs shell. Here the
  second attempt succeeded in decrypting the root partition, however, it
  usually takes a lot more attempts to do so.

  As for some additional information, I can decrypt the same luks
  partition from a live USB without any problems whatsoever.

  echo 123456 | cryptsetup open --type luks --debug /dev/nvme0n1p3 
nvme0n1p3_crypt
  # cryptsetup 2.4.3 processing "cryptsetup open --type luks --debug 
/dev/nvme0n1p3 nvme0n1p3_crypt"
  # Running command open.
  # Locking memory.
  # Installing SIGINT/SIGTERM handler.
  # Unblocking interruption on signal.
  # Allocating context for crypt device /dev/nvme0n1p3.
  # Trying to open and read device /dev/nvme0n1p3 with direct-io.
  # Initialising device-mapper backend library.
  # Trying to load any crypt type from device /dev/nvme0n1p3.
  # Crypto backend (OpenSSL 3.0.2 15 Mar 2022 [default]) initialized in 
cryptsetup library version 2.4.3.
  # Detected kernel Linux 5.15.0-46-generic x86_64.
  # Loading LUKS2 header (repair disabled).
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Trying to read primary LUKS2 header at offset 0x0.
  # Opening locked device /dev/nvme0n1p3
  # Verifying locked device handle (bdev)
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(on-disk)
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(in-memory)
  # Trying to read secondary LUKS2 header at offset 0x4000.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(on-disk)
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(in-memory)
  # Device size 497776852992, offset 16777216.
  # Device /dev/nvme0n1p3 READ lock released.
  # PBKDF argon2id, time_ms 2000 (iterations 0), max_memory_kb 1048576, 
parallel_threads 4.
  # Activating volume nvme0n1p3_crypt using token (any type) -1.
  # dm version   [ opencount flush ]   [16384] (*1)
  # dm versions   [ opencount flush ]   [16384] (*1)
  # Detected dm-ioctl version 4.45.0.
  # Detected dm-crypt version 1.23.0.
  # Device-mapper backend running with UDEV support enabled.
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  No usable token is available.
  # STDIN descriptor passphrase entry requested.
  # Activating volume nvme0n1p3_crypt [keyslot -1] using passphrase.
  # dm versions   [ opencount flush ]   [16384] (*1)
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  # Keyslot 0 priority 1 != 2 (required), skipped.
  # Keyslot 1 priority 1 != 2 (required), skipped.
  # Trying to open LUKS2 keyslot 0.
  # Running keyslot key derivation.
  # Reading keyslot area [0x8000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # Device /dev/nvme0n1p3 READ lock released.
  # Verifying key from keyslot 0, digest 0.
  # Digest 0 (pbkdf2) verify failed with -1.
  # Trying to open LUKS2 keyslot 1.
  # Running keyslot key derivation.
  # Reading keyslot area [0x47000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # Device /dev/nvme0n1p3 READ lock released.
  # Verifying key from keyslot 1, digest 0.
  # Digest 0 (pbkdf2) verify 

[Kernel-packages] [Bug 1986623] Re: cryptsetup fails to decrypt root partion during boot

2023-02-18 Thread Gary Brainin
Success?

Based only on the error message, I tried defining tmpData in
/etc/crypttab.  Previously, the file consisted of one line:

sda6_crypt UUID={uuid} none luks,discard

I added a second line:

tmpData UUID={uuid} none luks,discard

and re-ran update-initramfs.  It still produced the other messages above
(lines starting with I:), but on reboot it did not drop me into a
busybox shell.

Note that it did ask me for the password for tmpData, where before it
was asking for the password for /dev/sda3 (the encrypted partition), but
otherwise it appears to have booted normally.

So, not entirely sure if this is a solution or a kludge.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1986623

Title:
  cryptsetup fails to decrypt root partion during boot

Status in cryptsetup package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  During boot, cryptsetup fails to decrypt the root partition in a,
  seemingly, non-deterministic fashion. I know that the password is
  correct and that the keymap is not a fault either, because I have
  specifically chosen the very weak password "123456" for testing
  purposes. A hardware defect seems also rather unlikely as this
  behavior does not affect other Linux distributions or FreeBSD. Earlier
  Ubuntu versions do not seem to be affected either, as this bug appears
  to have been introduced during a kernel update in 20.04 and persists
  throughout 20.04-22.04. Unfortunately I cannot pinpoint the exact
  kernel update that introduced this bug. I have appended the output of
  cryptsetup when manually called from the initramfs shell. Here the
  second attempt succeeded in decrypting the root partition, however, it
  usually takes a lot more attempts to do so.

  As for some additional information, I can decrypt the same luks
  partition from a live USB without any problems whatsoever.

  echo 123456 | cryptsetup open --type luks --debug /dev/nvme0n1p3 
nvme0n1p3_crypt
  # cryptsetup 2.4.3 processing "cryptsetup open --type luks --debug 
/dev/nvme0n1p3 nvme0n1p3_crypt"
  # Running command open.
  # Locking memory.
  # Installing SIGINT/SIGTERM handler.
  # Unblocking interruption on signal.
  # Allocating context for crypt device /dev/nvme0n1p3.
  # Trying to open and read device /dev/nvme0n1p3 with direct-io.
  # Initialising device-mapper backend library.
  # Trying to load any crypt type from device /dev/nvme0n1p3.
  # Crypto backend (OpenSSL 3.0.2 15 Mar 2022 [default]) initialized in 
cryptsetup library version 2.4.3.
  # Detected kernel Linux 5.15.0-46-generic x86_64.
  # Loading LUKS2 header (repair disabled).
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Trying to read primary LUKS2 header at offset 0x0.
  # Opening locked device /dev/nvme0n1p3
  # Verifying locked device handle (bdev)
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(on-disk)
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(in-memory)
  # Trying to read secondary LUKS2 header at offset 0x4000.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(on-disk)
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(in-memory)
  # Device size 497776852992, offset 16777216.
  # Device /dev/nvme0n1p3 READ lock released.
  # PBKDF argon2id, time_ms 2000 (iterations 0), max_memory_kb 1048576, 
parallel_threads 4.
  # Activating volume nvme0n1p3_crypt using token (any type) -1.
  # dm version   [ opencount flush ]   [16384] (*1)
  # dm versions   [ opencount flush ]   [16384] (*1)
  # Detected dm-ioctl version 4.45.0.
  # Detected dm-crypt version 1.23.0.
  # Device-mapper backend running with UDEV support enabled.
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  No usable token is available.
  # STDIN descriptor passphrase entry requested.
  # Activating volume nvme0n1p3_crypt [keyslot -1] using passphrase.
  # dm versions   [ opencount flush ]   [16384] (*1)
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  # Keyslot 0 priority 1 != 2 (required), skipped.
  # Keyslot 1 priority 1 != 2 (required), skipped.
  # Trying to open LUKS2 keyslot 0.
  # Running keyslot key derivation.
  # Reading keyslot area [0x8000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # Device /dev/nvme0n1p3 READ lock 

[Kernel-packages] [Bug 1986623] Re: cryptsetup fails to decrypt root partion during boot

2023-02-18 Thread Gary Brainin
I'm getting a bit over my head, but it is seeming like there's a problem
with creating a new initrd.

When I decrypt (using unmkinitramfs) the initrd.img file, I see that the
"good" version has a /main/cryptroot/crypttab file which appears
identical to /etc/crypttab.  The "bad" version has an empty file there
(0 bytes).

Attempting to manually repair (using sudo update-initramfs -u) gives the 
following error:
cryptsetup: WARNING: target 'tmpData' not found in /etc/crypttab
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/vgubuntu-swap_1)
I: Set RESUME variable to override this.

The file thus generated has a zero-byte crypttab file as before.

Therefore, I'm thinking the problem is here, in the generation of the
initramfs.  Anyone have a clue from the above?  Should I be posting a
new bug report indicating that update-initramfs is failing?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1986623

Title:
  cryptsetup fails to decrypt root partion during boot

Status in cryptsetup package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  During boot, cryptsetup fails to decrypt the root partition in a,
  seemingly, non-deterministic fashion. I know that the password is
  correct and that the keymap is not a fault either, because I have
  specifically chosen the very weak password "123456" for testing
  purposes. A hardware defect seems also rather unlikely as this
  behavior does not affect other Linux distributions or FreeBSD. Earlier
  Ubuntu versions do not seem to be affected either, as this bug appears
  to have been introduced during a kernel update in 20.04 and persists
  throughout 20.04-22.04. Unfortunately I cannot pinpoint the exact
  kernel update that introduced this bug. I have appended the output of
  cryptsetup when manually called from the initramfs shell. Here the
  second attempt succeeded in decrypting the root partition, however, it
  usually takes a lot more attempts to do so.

  As for some additional information, I can decrypt the same luks
  partition from a live USB without any problems whatsoever.

  echo 123456 | cryptsetup open --type luks --debug /dev/nvme0n1p3 
nvme0n1p3_crypt
  # cryptsetup 2.4.3 processing "cryptsetup open --type luks --debug 
/dev/nvme0n1p3 nvme0n1p3_crypt"
  # Running command open.
  # Locking memory.
  # Installing SIGINT/SIGTERM handler.
  # Unblocking interruption on signal.
  # Allocating context for crypt device /dev/nvme0n1p3.
  # Trying to open and read device /dev/nvme0n1p3 with direct-io.
  # Initialising device-mapper backend library.
  # Trying to load any crypt type from device /dev/nvme0n1p3.
  # Crypto backend (OpenSSL 3.0.2 15 Mar 2022 [default]) initialized in 
cryptsetup library version 2.4.3.
  # Detected kernel Linux 5.15.0-46-generic x86_64.
  # Loading LUKS2 header (repair disabled).
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Trying to read primary LUKS2 header at offset 0x0.
  # Opening locked device /dev/nvme0n1p3
  # Verifying locked device handle (bdev)
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(on-disk)
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(in-memory)
  # Trying to read secondary LUKS2 header at offset 0x4000.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(on-disk)
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(in-memory)
  # Device size 497776852992, offset 16777216.
  # Device /dev/nvme0n1p3 READ lock released.
  # PBKDF argon2id, time_ms 2000 (iterations 0), max_memory_kb 1048576, 
parallel_threads 4.
  # Activating volume nvme0n1p3_crypt using token (any type) -1.
  # dm version   [ opencount flush ]   [16384] (*1)
  # dm versions   [ opencount flush ]   [16384] (*1)
  # Detected dm-ioctl version 4.45.0.
  # Detected dm-crypt version 1.23.0.
  # Device-mapper backend running with UDEV support enabled.
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  No usable token is available.
  # STDIN descriptor passphrase entry requested.
  # Activating volume nvme0n1p3_crypt [keyslot -1] using passphrase.
  # dm versions   [ opencount flush ]   [16384] (*1)
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  # Keyslot 0 priority 1 != 2 (required), skipped.
  # Keyslot 1 priority 1 != 2 (required), skipped.
  # Trying to open LUKS2 keyslot 0.
  # Running keyslot key derivation.
  # Reading keyslot area [0x8000].
  # Acquiring read lock for device /dev/nvme0n1p3.

[Kernel-packages] [Bug 1986623] Re: cryptsetup fails to decrypt root partion during boot

2023-02-17 Thread Gary Brainin
Correction: It is not the kernel itself I was talking about, above.
It's the initrd.img file associated with the kernel.

Note also that replacing that file with the old version eliminates the
problem (at least until some update changes it again).

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1986623

Title:
  cryptsetup fails to decrypt root partion during boot

Status in cryptsetup package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  During boot, cryptsetup fails to decrypt the root partition in a,
  seemingly, non-deterministic fashion. I know that the password is
  correct and that the keymap is not a fault either, because I have
  specifically chosen the very weak password "123456" for testing
  purposes. A hardware defect seems also rather unlikely as this
  behavior does not affect other Linux distributions or FreeBSD. Earlier
  Ubuntu versions do not seem to be affected either, as this bug appears
  to have been introduced during a kernel update in 20.04 and persists
  throughout 20.04-22.04. Unfortunately I cannot pinpoint the exact
  kernel update that introduced this bug. I have appended the output of
  cryptsetup when manually called from the initramfs shell. Here the
  second attempt succeeded in decrypting the root partition, however, it
  usually takes a lot more attempts to do so.

  As for some additional information, I can decrypt the same luks
  partition from a live USB without any problems whatsoever.

  echo 123456 | cryptsetup open --type luks --debug /dev/nvme0n1p3 
nvme0n1p3_crypt
  # cryptsetup 2.4.3 processing "cryptsetup open --type luks --debug 
/dev/nvme0n1p3 nvme0n1p3_crypt"
  # Running command open.
  # Locking memory.
  # Installing SIGINT/SIGTERM handler.
  # Unblocking interruption on signal.
  # Allocating context for crypt device /dev/nvme0n1p3.
  # Trying to open and read device /dev/nvme0n1p3 with direct-io.
  # Initialising device-mapper backend library.
  # Trying to load any crypt type from device /dev/nvme0n1p3.
  # Crypto backend (OpenSSL 3.0.2 15 Mar 2022 [default]) initialized in 
cryptsetup library version 2.4.3.
  # Detected kernel Linux 5.15.0-46-generic x86_64.
  # Loading LUKS2 header (repair disabled).
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Trying to read primary LUKS2 header at offset 0x0.
  # Opening locked device /dev/nvme0n1p3
  # Verifying locked device handle (bdev)
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(on-disk)
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(in-memory)
  # Trying to read secondary LUKS2 header at offset 0x4000.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(on-disk)
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(in-memory)
  # Device size 497776852992, offset 16777216.
  # Device /dev/nvme0n1p3 READ lock released.
  # PBKDF argon2id, time_ms 2000 (iterations 0), max_memory_kb 1048576, 
parallel_threads 4.
  # Activating volume nvme0n1p3_crypt using token (any type) -1.
  # dm version   [ opencount flush ]   [16384] (*1)
  # dm versions   [ opencount flush ]   [16384] (*1)
  # Detected dm-ioctl version 4.45.0.
  # Detected dm-crypt version 1.23.0.
  # Device-mapper backend running with UDEV support enabled.
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  No usable token is available.
  # STDIN descriptor passphrase entry requested.
  # Activating volume nvme0n1p3_crypt [keyslot -1] using passphrase.
  # dm versions   [ opencount flush ]   [16384] (*1)
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  # Keyslot 0 priority 1 != 2 (required), skipped.
  # Keyslot 1 priority 1 != 2 (required), skipped.
  # Trying to open LUKS2 keyslot 0.
  # Running keyslot key derivation.
  # Reading keyslot area [0x8000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # Device /dev/nvme0n1p3 READ lock released.
  # Verifying key from keyslot 0, digest 0.
  # Digest 0 (pbkdf2) verify failed with -1.
  # Trying to open LUKS2 keyslot 1.
  # Running keyslot key derivation.
  # Reading keyslot area [0x47000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock 

[Kernel-packages] [Bug 1986623] Re: cryptsetup fails to decrypt root partion during boot

2023-02-16 Thread Gary Brainin
I am able to reproduce the error when I install the new 5.19.0-32
kernel.

Also, when I install the package "Firmware for Linux kernel drivers," it
modifies the files for the older kernels (5.15.0-60 and 5.15.0-43),
making them have the same problem.  The 5.15.0-60 file goes from
111,616,247 bytes to 111,639,335; 5.15.0-43 goes from 110,310,042 to
24,544,316 (not a typo, it's about 25% of the former size).  So I can't
even choose an earlier kernel from the grub menu.

The error seems to be associated with some change in the kernel or
kernel related items.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1986623

Title:
  cryptsetup fails to decrypt root partion during boot

Status in cryptsetup package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  During boot, cryptsetup fails to decrypt the root partition in a,
  seemingly, non-deterministic fashion. I know that the password is
  correct and that the keymap is not a fault either, because I have
  specifically chosen the very weak password "123456" for testing
  purposes. A hardware defect seems also rather unlikely as this
  behavior does not affect other Linux distributions or FreeBSD. Earlier
  Ubuntu versions do not seem to be affected either, as this bug appears
  to have been introduced during a kernel update in 20.04 and persists
  throughout 20.04-22.04. Unfortunately I cannot pinpoint the exact
  kernel update that introduced this bug. I have appended the output of
  cryptsetup when manually called from the initramfs shell. Here the
  second attempt succeeded in decrypting the root partition, however, it
  usually takes a lot more attempts to do so.

  As for some additional information, I can decrypt the same luks
  partition from a live USB without any problems whatsoever.

  echo 123456 | cryptsetup open --type luks --debug /dev/nvme0n1p3 
nvme0n1p3_crypt
  # cryptsetup 2.4.3 processing "cryptsetup open --type luks --debug 
/dev/nvme0n1p3 nvme0n1p3_crypt"
  # Running command open.
  # Locking memory.
  # Installing SIGINT/SIGTERM handler.
  # Unblocking interruption on signal.
  # Allocating context for crypt device /dev/nvme0n1p3.
  # Trying to open and read device /dev/nvme0n1p3 with direct-io.
  # Initialising device-mapper backend library.
  # Trying to load any crypt type from device /dev/nvme0n1p3.
  # Crypto backend (OpenSSL 3.0.2 15 Mar 2022 [default]) initialized in 
cryptsetup library version 2.4.3.
  # Detected kernel Linux 5.15.0-46-generic x86_64.
  # Loading LUKS2 header (repair disabled).
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Trying to read primary LUKS2 header at offset 0x0.
  # Opening locked device /dev/nvme0n1p3
  # Verifying locked device handle (bdev)
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(on-disk)
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(in-memory)
  # Trying to read secondary LUKS2 header at offset 0x4000.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(on-disk)
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(in-memory)
  # Device size 497776852992, offset 16777216.
  # Device /dev/nvme0n1p3 READ lock released.
  # PBKDF argon2id, time_ms 2000 (iterations 0), max_memory_kb 1048576, 
parallel_threads 4.
  # Activating volume nvme0n1p3_crypt using token (any type) -1.
  # dm version   [ opencount flush ]   [16384] (*1)
  # dm versions   [ opencount flush ]   [16384] (*1)
  # Detected dm-ioctl version 4.45.0.
  # Detected dm-crypt version 1.23.0.
  # Device-mapper backend running with UDEV support enabled.
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  No usable token is available.
  # STDIN descriptor passphrase entry requested.
  # Activating volume nvme0n1p3_crypt [keyslot -1] using passphrase.
  # dm versions   [ opencount flush ]   [16384] (*1)
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  # Keyslot 0 priority 1 != 2 (required), skipped.
  # Keyslot 1 priority 1 != 2 (required), skipped.
  # Trying to open LUKS2 keyslot 0.
  # Running keyslot key derivation.
  # Reading keyslot area [0x8000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # Device /dev/nvme0n1p3 READ lock released.
  # Verifying key from keyslot 0, digest 0.
  # Digest 0 (pbkdf2) verify 

[Kernel-packages] [Bug 1986623] Re: cryptsetup fails to decrypt root partion during boot

2023-02-13 Thread Gary Brainin
Fresh install worked until I did today's recommended updates, then the
problem recurred.  Not sure exactly what was updated; I thought
/var/log/dpkg.log was supposed to be human-readable, but mine isn't.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1986623

Title:
  cryptsetup fails to decrypt root partion during boot

Status in cryptsetup package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  During boot, cryptsetup fails to decrypt the root partition in a,
  seemingly, non-deterministic fashion. I know that the password is
  correct and that the keymap is not a fault either, because I have
  specifically chosen the very weak password "123456" for testing
  purposes. A hardware defect seems also rather unlikely as this
  behavior does not affect other Linux distributions or FreeBSD. Earlier
  Ubuntu versions do not seem to be affected either, as this bug appears
  to have been introduced during a kernel update in 20.04 and persists
  throughout 20.04-22.04. Unfortunately I cannot pinpoint the exact
  kernel update that introduced this bug. I have appended the output of
  cryptsetup when manually called from the initramfs shell. Here the
  second attempt succeeded in decrypting the root partition, however, it
  usually takes a lot more attempts to do so.

  As for some additional information, I can decrypt the same luks
  partition from a live USB without any problems whatsoever.

  echo 123456 | cryptsetup open --type luks --debug /dev/nvme0n1p3 
nvme0n1p3_crypt
  # cryptsetup 2.4.3 processing "cryptsetup open --type luks --debug 
/dev/nvme0n1p3 nvme0n1p3_crypt"
  # Running command open.
  # Locking memory.
  # Installing SIGINT/SIGTERM handler.
  # Unblocking interruption on signal.
  # Allocating context for crypt device /dev/nvme0n1p3.
  # Trying to open and read device /dev/nvme0n1p3 with direct-io.
  # Initialising device-mapper backend library.
  # Trying to load any crypt type from device /dev/nvme0n1p3.
  # Crypto backend (OpenSSL 3.0.2 15 Mar 2022 [default]) initialized in 
cryptsetup library version 2.4.3.
  # Detected kernel Linux 5.15.0-46-generic x86_64.
  # Loading LUKS2 header (repair disabled).
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Trying to read primary LUKS2 header at offset 0x0.
  # Opening locked device /dev/nvme0n1p3
  # Verifying locked device handle (bdev)
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(on-disk)
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(in-memory)
  # Trying to read secondary LUKS2 header at offset 0x4000.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(on-disk)
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(in-memory)
  # Device size 497776852992, offset 16777216.
  # Device /dev/nvme0n1p3 READ lock released.
  # PBKDF argon2id, time_ms 2000 (iterations 0), max_memory_kb 1048576, 
parallel_threads 4.
  # Activating volume nvme0n1p3_crypt using token (any type) -1.
  # dm version   [ opencount flush ]   [16384] (*1)
  # dm versions   [ opencount flush ]   [16384] (*1)
  # Detected dm-ioctl version 4.45.0.
  # Detected dm-crypt version 1.23.0.
  # Device-mapper backend running with UDEV support enabled.
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  No usable token is available.
  # STDIN descriptor passphrase entry requested.
  # Activating volume nvme0n1p3_crypt [keyslot -1] using passphrase.
  # dm versions   [ opencount flush ]   [16384] (*1)
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  # Keyslot 0 priority 1 != 2 (required), skipped.
  # Keyslot 1 priority 1 != 2 (required), skipped.
  # Trying to open LUKS2 keyslot 0.
  # Running keyslot key derivation.
  # Reading keyslot area [0x8000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # Device /dev/nvme0n1p3 READ lock released.
  # Verifying key from keyslot 0, digest 0.
  # Digest 0 (pbkdf2) verify failed with -1.
  # Trying to open LUKS2 keyslot 1.
  # Running keyslot key derivation.
  # Reading keyslot area [0x47000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Reusing open ro fd on device 

[Kernel-packages] [Bug 1986623] Re: cryptsetup fails to decrypt root partion during boot

2023-02-11 Thread Gary Brainin
I have an Intel Core i5-4590.

Also just tried a fresh install (Ubuntu 22.04) on a spare hard drive,
and it boots fine using kernel 5.15.0-60-generic.  Note that spare is a
traditional hard drive and main drive is an SSD; next I'll try
reinstalling on the SSD.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1986623

Title:
  cryptsetup fails to decrypt root partion during boot

Status in cryptsetup package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  During boot, cryptsetup fails to decrypt the root partition in a,
  seemingly, non-deterministic fashion. I know that the password is
  correct and that the keymap is not a fault either, because I have
  specifically chosen the very weak password "123456" for testing
  purposes. A hardware defect seems also rather unlikely as this
  behavior does not affect other Linux distributions or FreeBSD. Earlier
  Ubuntu versions do not seem to be affected either, as this bug appears
  to have been introduced during a kernel update in 20.04 and persists
  throughout 20.04-22.04. Unfortunately I cannot pinpoint the exact
  kernel update that introduced this bug. I have appended the output of
  cryptsetup when manually called from the initramfs shell. Here the
  second attempt succeeded in decrypting the root partition, however, it
  usually takes a lot more attempts to do so.

  As for some additional information, I can decrypt the same luks
  partition from a live USB without any problems whatsoever.

  echo 123456 | cryptsetup open --type luks --debug /dev/nvme0n1p3 
nvme0n1p3_crypt
  # cryptsetup 2.4.3 processing "cryptsetup open --type luks --debug 
/dev/nvme0n1p3 nvme0n1p3_crypt"
  # Running command open.
  # Locking memory.
  # Installing SIGINT/SIGTERM handler.
  # Unblocking interruption on signal.
  # Allocating context for crypt device /dev/nvme0n1p3.
  # Trying to open and read device /dev/nvme0n1p3 with direct-io.
  # Initialising device-mapper backend library.
  # Trying to load any crypt type from device /dev/nvme0n1p3.
  # Crypto backend (OpenSSL 3.0.2 15 Mar 2022 [default]) initialized in 
cryptsetup library version 2.4.3.
  # Detected kernel Linux 5.15.0-46-generic x86_64.
  # Loading LUKS2 header (repair disabled).
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Trying to read primary LUKS2 header at offset 0x0.
  # Opening locked device /dev/nvme0n1p3
  # Verifying locked device handle (bdev)
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(on-disk)
  # Checksum:99172356e66a2fec247b1e5c758af8bc1338a3fb8bd973aab5e1512a93b2dbdc 
(in-memory)
  # Trying to read secondary LUKS2 header at offset 0x4000.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # LUKS2 header version 2 of size 16384 bytes, checksum sha256.
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(on-disk)
  # Checksum:655a50aef64b6fd4e10b8863df72d7fc62a7020f74684cb3419d4e22adb6fd9c 
(in-memory)
  # Device size 497776852992, offset 16777216.
  # Device /dev/nvme0n1p3 READ lock released.
  # PBKDF argon2id, time_ms 2000 (iterations 0), max_memory_kb 1048576, 
parallel_threads 4.
  # Activating volume nvme0n1p3_crypt using token (any type) -1.
  # dm version   [ opencount flush ]   [16384] (*1)
  # dm versions   [ opencount flush ]   [16384] (*1)
  # Detected dm-ioctl version 4.45.0.
  # Detected dm-crypt version 1.23.0.
  # Device-mapper backend running with UDEV support enabled.
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  No usable token is available.
  # STDIN descriptor passphrase entry requested.
  # Activating volume nvme0n1p3_crypt [keyslot -1] using passphrase.
  # dm versions   [ opencount flush ]   [16384] (*1)
  # dm status nvme0n1p3_crypt  [ opencount noflush ]   [16384] (*1)
  # Keyslot 0 priority 1 != 2 (required), skipped.
  # Keyslot 1 priority 1 != 2 (required), skipped.
  # Trying to open LUKS2 keyslot 0.
  # Running keyslot key derivation.
  # Reading keyslot area [0x8000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 READ lock taken.
  # Reusing open ro fd on device /dev/nvme0n1p3
  # Device /dev/nvme0n1p3 READ lock released.
  # Verifying key from keyslot 0, digest 0.
  # Digest 0 (pbkdf2) verify failed with -1.
  # Trying to open LUKS2 keyslot 1.
  # Running keyslot key derivation.
  # Reading keyslot area [0x47000].
  # Acquiring read lock for device /dev/nvme0n1p3.
  # Opening lock resource file /run/cryptsetup/L_259:3
  # Verifying lock handle for /dev/nvme0n1p3.
  # Device /dev/nvme0n1p3 

[Kernel-packages] [Bug 344878] Re: file name too long when creating new file (ecryptfs_lookup: lookup_one_len() returned [-36] on lower_dentry)

2017-04-04 Thread Gary Brainin
Here's a new bug: There doesn't seem to be a way to mark comments as
spam.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/344878

Title:
  file name too long when creating new file (ecryptfs_lookup:
  lookup_one_len() returned [-36] on lower_dentry)

Status in eCryptfs:
  Fix Released
Status in ecryptfs-utils package in Ubuntu:
  Invalid
Status in linux package in Ubuntu:
  Fix Released
Status in ecryptfs-utils source package in Natty:
  Won't Fix
Status in linux source package in Natty:
  Won't Fix
Status in ecryptfs-utils source package in Oneiric:
  Won't Fix
Status in linux source package in Oneiric:
  Won't Fix
Status in ecryptfs-utils source package in Precise:
  Invalid
Status in linux source package in Precise:
  Fix Released

Bug description:
  ===
  IMPORTANT: eCryptfs can only store filenames of up to 143 characters when 
filename encryption is enabled. The remaining 112 characters are used for 
storing metadata such as the encrypted filename prefix, the signature of the 
filename encryption key, and an identifier for the cipher used, as well as 
random bytes to make /foo/file and /bar/file encrypt to different ciphertext 
and padding bytes to achieve proper cipher block size alignment.

  This bug is considered 'fixed' by the upstream maintainers. The
  eCryptfs kernel error message has been reduced to a debug level log
  message and eCryptfs now correctly reports its maximum supported
  filename length through the statfs() syscall. This is all that can be
  done without implementing a completely new encrypted filename design.
  A design that allows 255 character filenames without introducing other
  design limitations has not been identified and no one is currently
  working to come up with such a design.

  Please do not add comments or create new bugs saying that mv reports
  'File name too long' or that you can't create a long filename in your
  eCryptfs mounts. It is an unfortunate design limitation that cannot be
  avoided at this time.

  Please do create new bugs when an application generates filenames that are 
too long to be stored in an eCryptfs mount. The application may be able to use 
the statfs() syscall to check the filename length limits of eCryptfs. Note that 
this does not include something like a torrent or ftp client trying to download 
a file with a long filename. The application is not generating the filename in 
those cases, it is just downloading the file that the user told it to download.
  ===

  When trying to create a new file with a relatively long filename (f. ex. 
dfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqb.txt)
  I get an error: file name to long, when in fact the file name is not to long, 
but the encrypted name created for this file is to long, so, the file was not 
created.

  this is no problem when I try to create a file, but when I'm copying a
  lot of files to my home folder I get some: filename to long error's
  and it's hard to fix (first locate the file, create shorter name, move
  again)

  so, maybe you could create a check for to long filenames?

  I'm using ext4 here...

  mv 
dfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqb.txt
 /home/jens/
  mv: cannot stat 
`/home/jens/dfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqb.txt':
 File name too long

  libecryptfs0:
    Installed: 71-0ubuntu2
    Candidate: 71-0ubuntu2
    Version table:
   *** 71-0ubuntu2 0
  500 http://be.archive.ubuntu.com jaunty/main Packages
  100 /var/lib/dpkg/status

To manage notifications about this bug go to:
https://bugs.launchpad.net/ecryptfs/+bug/344878/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 344878] Re: file name too long when creating new file (ecryptfs_lookup: lookup_one_len() returned [-36] on lower_dentry)

2017-02-18 Thread Gary Brainin
@baltic (bugsgenerator) You're right, but the powers that be have for
years refused to see the distinction between changing the way filenames
are handled (which they have, I think, adequately explained the
technical reasons for not doing) and providing adequate documentation
and error handling (which they have conveniently ignored).

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/344878

Title:
  file name too long when creating new file (ecryptfs_lookup:
  lookup_one_len() returned [-36] on lower_dentry)

Status in eCryptfs:
  Fix Released
Status in ecryptfs-utils package in Ubuntu:
  Invalid
Status in linux package in Ubuntu:
  Fix Released
Status in ecryptfs-utils source package in Natty:
  Won't Fix
Status in linux source package in Natty:
  Won't Fix
Status in ecryptfs-utils source package in Oneiric:
  Won't Fix
Status in linux source package in Oneiric:
  Won't Fix
Status in ecryptfs-utils source package in Precise:
  Invalid
Status in linux source package in Precise:
  Fix Released

Bug description:
  ===
  IMPORTANT: eCryptfs can only store filenames of up to 143 characters when 
filename encryption is enabled. The remaining 112 characters are used for 
storing metadata such as the encrypted filename prefix, the signature of the 
filename encryption key, and an identifier for the cipher used, as well as 
random bytes to make /foo/file and /bar/file encrypt to different ciphertext 
and padding bytes to achieve proper cipher block size alignment.

  This bug is considered 'fixed' by the upstream maintainers. The
  eCryptfs kernel error message has been reduced to a debug level log
  message and eCryptfs now correctly reports its maximum supported
  filename length through the statfs() syscall. This is all that can be
  done without implementing a completely new encrypted filename design.
  A design that allows 255 character filenames without introducing other
  design limitations has not been identified and no one is currently
  working to come up with such a design.

  Please do not add comments or create new bugs saying that mv reports
  'File name too long' or that you can't create a long filename in your
  eCryptfs mounts. It is an unfortunate design limitation that cannot be
  avoided at this time.

  Please do create new bugs when an application generates filenames that are 
too long to be stored in an eCryptfs mount. The application may be able to use 
the statfs() syscall to check the filename length limits of eCryptfs. Note that 
this does not include something like a torrent or ftp client trying to download 
a file with a long filename. The application is not generating the filename in 
those cases, it is just downloading the file that the user told it to download.
  ===

  When trying to create a new file with a relatively long filename (f. ex. 
dfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqb.txt)
  I get an error: file name to long, when in fact the file name is not to long, 
but the encrypted name created for this file is to long, so, the file was not 
created.

  this is no problem when I try to create a file, but when I'm copying a
  lot of files to my home folder I get some: filename to long error's
  and it's hard to fix (first locate the file, create shorter name, move
  again)

  so, maybe you could create a check for to long filenames?

  I'm using ext4 here...

  mv 
dfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqb.txt
 /home/jens/
  mv: cannot stat 
`/home/jens/dfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqbdfkmqsdgjfmqsldjfmlsqkjlqkdmfsmgjlqlskdqshgpoizehmlqkbgmlqbgmqb.txt':
 File name too long

  libecryptfs0:
    Installed: 71-0ubuntu2
    Candidate: 71-0ubuntu2
    Version table:
   *** 71-0ubuntu2 0
  500 http://be.archive.ubuntu.com jaunty/main Packages
  100 /var/lib/dpkg/status

To manage notifications about this bug go to:
https://bugs.launchpad.net/ecryptfs/+bug/344878/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp