Ruby 3.2.11 for ubuntu-26.04 isn't linked against libcrypt: String#crypt ignores $1$/$5$/$6$ salts
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- github-actions, linux, ruby, ubuntu
- Área
- build-system, release
Línea de trabajo
Reproduce on the ruby-3.2.11-ubuntu-26.04-x64.tar.gz asset: run ldd bin/ruby and ldd lib/libruby.so.3.2 looking for libcrypt.so.1, then compare 'reallybadpassword'.crypt('$6$badsalt') with the expected $6$ hash. The build is in ruby/ruby-builder, not this action; check the 26.04 build environment for libcrypt-dev/libxcrypt and the upload date noted in the issue. Done means rebuilt x64 and, if affected, arm64 assets link libcrypt and return correct MD5/SHA-256/SHA-512 hashes, with the preinstalled toolcache copy updated.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Ensure the following before filing this issue
- I verified it reproduces with the latest version with
- uses: ruby/setup-ruby@v1(see Versioning policy) - I tried to reproduce the issue locally by following the workflow steps (including all commands done by
ruby/setup-ruby, except forDownloading Ruby&Extracting Ruby),
and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)
Are you running on a GitHub-hosted runner or a self-hosted runner?
GitHub-hosted runner
Link to the failed workflow job (must be a public workflow job, so the necessary information is available)
https://github.com/simp/pupmod-simp-simplib/actions/runs/44468083095/job/135370960820
Any other notes?
The Ruby 3.2.11 build for Ubuntu 26.04 (ruby-3.2.11-ubuntu-26.04-x64.tar.gz from ruby/ruby-builder) isn't linked against libcrypt, so String#crypt falls back to Ruby's built-in DES-only implementation and ignores $1$/$5$/$6$ (MD5/SHA-256/SHA-512) salts:
'reallybadpassword'.crypt('$6$badsalt')
# ubuntu-26.04 build: "$6aEPTnyKi88Q" (13-character DES hash)
# expected: "$6$badsalt$hk7dh/Mz.oPuPZgDkPrNU/WSQOOq6T8PA8FO4mmLkfGdgvyEvqd8HyD5UeD2aYysmczplpo5qkU8RYjX1R6LS0"
In the linked job, ruby-version: 3.2.11 resolved to the copy the ubuntu-26.04 runner image preinstalls in /opt/hostedtoolcache/Ruby/3.2.11/x64. That copy is the same ruby-builder asset.
I compared builds in containers (ldd on bin/ruby and lib/libruby.so.3.2, then the crypt call above):
| Ruby 3.2.11 | Platform | libcrypt linked | $6$ result |
|---|---|---|---|
ruby-builder ruby-3.2.11-ubuntu-26.04-x64 |
ubuntu:26.04 |
no | DES (wrong) |
ruby-builder ruby-3.2.11-ubuntu-24.04-x64 |
ubuntu:24.04 |
libcrypt.so.1 |
correct |
| built from the ruby-lang.org tarball (sha256 matches), GCC 15.2.0, libcrypt-dev 1:4.5.1-1 | ubuntu:26.04 |
libcrypt.so.1 |
correct |
official ruby:3.2 image |
Debian 13 | libcrypt.so.1 |
correct |
The local source build's configure finds everything on 26.04 (crypt in -lcrypt... yes, crypt_r... yes, crypt.h... yes), so Ruby 3.2 itself builds correctly there.
Only this one asset seems to be affected. The 26.04 x64 builds of 3.3.14, 3.4.13 and 4.0.10 (published 2026-11-18) all link libcrypt and return correct $6$ hashes. The 3.2.11 26.04 asset was uploaded on 2026-06-20, during the Ubuntu 26.04 preview, so its build environment probably lacked libcrypt-dev (libxcrypt) at that time. I haven't checked the arm64 asset.
I realise Ruby 3.2 is EOL. Would it be possible to rebuild ruby-3.2.11-ubuntu-26.04-x64 (and arm64, if it's affected too) in the current 26.04 environment? Ruby 3.2 is still the Ruby that OpenVox/Puppet 8 agents ship, so projects keep testing against it.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1k
- Forks
- 381
- Merge medio
- 17 h 39 min
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ruby/setup-ruby
-
macOS Rubies need Homebrew openssl@4 >= 4.1 since #980; an older 4.x segfaults instead of erroringAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
ruby/setup-ruby#981 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
The future of ruby-locoAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
ruby/setup-ruby#972 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 20/100
ruby/setup-ruby#967 · 3 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
ruby/setup-ruby#801 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
ruby/setup-ruby#791 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de ruby/setup-ruby
Issues similares
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Kanevry/session-orchestrator#108 ·
-
PHP 8.6: "Returning a value from a constructor is deprecated" in app/Common/Models/Model.phpAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
awesomemotive/all-in-one-seo-pack#3238 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
andromarces/agent-loops#2055 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días