# Resolved: Bit Flip Corruption in Cryptsetup Binary

## Summary
Bit flip corruption in cryptsetup binary causing segmentation fault during
boot. Regenerating the initramfs with a uncorrupted binary allows decryption
and normal boot.


## Description
A bit flip occurred in the cryptsetup binary within the initramfs, causing 
segmentation faults and preventing successful LUKS decryption during boot. The 
corruption was detected when comparing working and non-working initramfs images.

## Evidence of Corruption

# Extract both initramfs images
mkdir initrd.34 && cd initrd.34
unmkinitramfs /boot/initrd.img-6.14.0-34-generic .
cd ..

mkdir initrd.35 && cd initrd.35  
unmkinitramfs /boot/initrd.img-6.14.0-35-generic .
cd ..

# Generate checksums
find initrd.34 -type f -exec md5sum {} \; > initrd-34.checksums.txt
find initrd.35 -type f -exec md5sum {} \; > initrd-35.checksums.txt

### Working vs Corrupted Binary
```
# Working initramfs (kernel 6.14.0-34):
$ /tmp/initrd.34/main/usr/sbin/cryptsetup --version
cryptsetup 2.7.5 flags: UDEV BLKID KEYRING FIPS KERNEL_CAPI HW_OPAL

# Corrupted initramfs (kernel 6.14.0-35):
$ /tmp/initrd.35/main/usr/sbin/cryptsetup --version
Segmentation fault (core dumped)
```

### Checksum Verification
```
# Checksum differences confirm binary corruption:
$ grep cryptsetup initrd-34.checksums.txt
8579c3e53069dfc5666e2a852e1bf8b1  ./main/usr/sbin/cryptsetup

$ grep cryptsetup initrd-35.checksums.txt  
f143a736cc702efa927b5c87ba06a19d  ./main/usr/sbin/cryptsetup

# Binary comparison confirms bit flip:
$ cmp -l initrd.34/main/usr/sbin/cryptsetup initrd.35/main/usr/sbin/cryptsetup
  5540   0   4
```

## Solution:

### Regenerated initramfs image
```
$ sudo update-initramfs -d -k 6.14.0-35-generic
$ sudo update-initramfs -u -k 6.14.0-35-generic  
$ sudo update-grub
```

Can now boot and decrypt my root partition using kernel
6.14.0-35-generic


** Changed in: ubuntu
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2130368

Title:
  Segmentation fault decrypting root partition when using kernel
  6.14.0-35.35

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


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to