Crypto related operations failing on Alpine Linux on QEMU 4.0

Bug #1834613 reported by DDoSolitary
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

I'm unable to boot the netboot image of Alpine Linux using QEMU 4.0.

Steps to reproduce:

curl -O http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/ppc64le/netboot/vmlinuz-vanilla
curl -O http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/ppc64le/netboot/initramfs-vanilla
qemu-system-ppc64 -kernel vmlinuz-vanilla -initrd initramfs-vanilla -nographic -append "console=hvc0 ip=dhcp alpine_repo=http://dl-cdn.alpinelinux.org/alpine/v3.10/main"

The init script will automatically download and install an in-memory Alpine Linux environment. However, with QEMU 4.0, the installation process will fail with "BAD signature" errors:

(1/20) Installing musl (1.1.22-r2)
ERROR: musl-1.1.22-r2: BAD signature
(2/20) Installing busybox (1.30.1-r2)
ERROR: busybox-1.30.1-r2: BAD signature
(3/20) Installing alpine-baselayout (3.1.2-r0)
Executing alpine-baselayout-3.1.2-r0.pre-install
ERROR: alpine-baselayout-3.1.2-r0.pre-install: script exited with error 127
ERROR: alpine-baselayout-3.1.2-r0: BAD signature
(4/20) Installing openrc (0.41.2-r1)
ERROR: openrc-0.41.2-r1: BAD signature
(5/20) Installing alpine-conf (3.8.3-r0)
ERROR: alpine-conf-3.8.3-r0: BAD signature
(6/20) Installing libcrypto1.1 (1.1.1c-r0)
ERROR: libcrypto1.1-1.1.1c-r0: BAD signature
(7/20) Installing libssl1.1 (1.1.1c-r0)
ERROR: libssl1.1-1.1.1c-r0: BAD signature
(8/20) Installing ca-certificates-cacert (20190108-r0)
ERROR: ca-certificates-cacert-20190108-r0: BAD signature
(9/20) Installing libtls-standalone (2.9.1-r0)
ERROR: libtls-standalone-2.9.1-r0: BAD signature
(10/20) Installing ssl_client (1.30.1-r2)
ERROR: ssl_client-1.30.1-r2: BAD signature
(11/20) Installing zlib (1.2.11-r1)
ERROR: zlib-1.2.11-r1: BAD signature
(12/20) Installing apk-tools (2.10.4-r1)
ERROR: apk-tools-2.10.4-r1: BAD signature
(13/20) Installing busybox-suid (1.30.1-r2)
ERROR: busybox-suid-1.30.1-r2: BAD signature
(14/20) Installing busybox-initscripts (3.1-r7)
ERROR: busybox-initscripts-3.1-r7: BAD signature
(15/20) Installing scanelf (1.2.3-r0)
ERROR: scanelf-1.2.3-r0: BAD signature
(16/20) Installing musl-utils (1.1.22-r2)
ERROR: musl-utils-1.1.22-r2: BAD signature
(17/20) Installing libc-utils (0.7.1-r0)
ERROR: libc-utils-0.7.1-r0: BAD signature
(18/20) Installing alpine-keys (2.1-r2)
ERROR: alpine-keys-2.1-r2: BAD signature
(19/20) Installing alpine-base (3.10.0-r0)
ERROR: alpine-base-3.10.0-r0: BAD signature
(20/20) Installing openssl (1.1.1c-r0)
ERROR: openssl-1.1.1c-r0: BAD signature
20 errors; 0 MiB in 0 packages
ok.
grep: /sysroot/etc/inittab: No such file or directory
/sbin/init not found in new root. Launching emergency recovery shell
Type exit to continue boot.
sh: can't access tty; job control turned off
/ #

If I boot up a disk image created by a previous version of QEMU, crypto related operations like verifying a RSA signature using the "openssl" command will also fail.

I didn't see these errors on previous QEMU versions or other architectures on QEMU 4.0

Tags: ppc
description: updated
description: updated
Revision history for this message
Laurent Vivier (laurent-vivier) wrote :

Fix for that is already included in git master:

2a1224359008 target/ppc: Fix lxvw4x, lxvh8x and lxvb16x

More fix for
8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access")
are availabe:

77bd8937c03d target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p
d47a751adab7 target/ppc: Fix xxbrq, xxbrw

And you can also need:

899f08ad1d12 tcg: Fix typos in helper_gvec_sar{8,32,64}v

depending on you host CPU

Revision history for this message
DDoSolitary (ddosolitary) wrote :

@laurent-vivier I just tested the binary built from git master and the error went away. Thanks.

Changed in qemu:
status: New → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
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.