Package: klibc-utils
Version: 2.0.12-1
Severity: normal

Hi,

I observed segfaults in armhf architecture when executing any of the
binaries /usr/lib/klibc/bin/{fstype, ls, cat, ...}, same is not seen in
amd64 and arm64 architectures.

This issue originally occurred when I am updating initramfs using
command `update-initramfs -u` which internally [1] uses klibc binary
`/usr/lib/klibc/bin/fstype` to check the fstype, it doesn't stop
creating initramfs but it creates core dumps in the rootfs and that
makes our images non-reproducible.

Follow below steps to reproduce this issue
```
$ sudo debootstrap --arch=arm bookworm arm-bookworm-rootfs/ 
http://deb.debian.org/debian/
$ sudo chroot arm-bookworm/ apt-update && apt install -y klibc-utils
$ sudo chroot arm-bookworm/ /usr/lib/klibc/bin/fstype --help
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
```

Expectation:
It should not generate core dumps

Kindly suggest us what is going wrong where all the binaries are generating 
core dumps in armhf architecture?

[1] 
https://salsa.debian.org/kernel-team/initramfs-tools/-/blob/v0.142/hooks/fsck?ref_type=tags#L55


-- System Information:
Debian Release: 12.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: armhf (armv7l)

Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_IN, LC_CTYPE=C.UTF-8 (charmap=locale: Cannot set LC_MESSAGES to 
default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
UTF-8), LANGUAGE=en_IN:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages klibc-utils depends on:
ii  libklibc  2.0.12-1

klibc-utils recommends no packages.

klibc-utils suggests no packages.

-- debconf information:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_IN:en",
        LC_ALL = (unset),
        LC_CTYPE = "C.UTF-8",
        LANG = "en_IN"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Reply via email to