Useradd broken on aarch64 package shadow
Pretty easy to replicate on an aarch64 system:
sudo docker run --rm -it alpine:3.18 sh
Unable to find image 'alpine:3.18' locally
3.18: Pulling from library/alpine
8c6d1654570f: Already exists
Digest: sha256:eb6d1672ad7f111808573036251ddaa518c976fcdf6615ff270f4d0327c5469f
Status: Downloaded newer image for alpine:3.18
/ # apk add shadow
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/aarch64/APKINDEX.tar.gz
(1/2) Installing linux-pam (1.5.2-r10)
(2/2) Installing shadow (4.13-r3)
Executing busybox-1.36.1-r0.trigger
OK: 13 MiB in 17 packages
/ # useradd user
useradd: failure while writing changes to /etc/passwd
This does not seem to effect 3.17 and version 4.13-r0, also the useradd bin previous to the CVE patch here: ced7d135 Was working on Alpine 3.18. I have to maintain a bunch of multi arch pipelines and this one has us shut down today.
I have only tested x86_64 and aarch64 x86_64 works and does not have this issue.
Let me know if you need anymore information.