Consider a separator for PCR[15] when leaving initrd
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c, linux
- Área
- operating-systems, security
Línea de trabajo
Start by reading the systemd-pcrphase implementation that measures leave-initrd into PCR[11], then trace how it handles PCR measurements and related tests. The requested behavior is to also measure a separator into PCR[15] at that point; done means the separator is extended there and the behavior is covered by a test. The issue does not name specific source or test files.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Component
No response
Is your feature request related to a problem? Please describe
Right now, when using e.g. tpm2-measure-pcr=yes to measure volume keys into PCR[15], there's the issue that failing the measurement will merely emit a warning into journald.
This has recently become an issue with the change to make systemd-cryptenroll use systemd-pcrextend.socket. Dracut does not ship that socket as of 112. ( I've made a fix, that's been merged into Dracut main and is scheduled for release 113 ). Same thing also affected Arch's mkinitcpio until 42.1.
Without this socket, instead of failing or an error, systemd-cryptenroll will emit
Sep 26 16:31:13 aurora systemd-cryptsetup[727]: Could not extend PCR: No such file or directory
Sep 26 16:31:13 aurora systemd-cryptsetup[727]: Could not extend NvPCR: No such file or directory
into the journal as warnings (second line is from tpm2-measure-nvpcr=yes).
The reason this is a problem is that when using say systemd-pcrlock with PCR[15] in the protection mask, you'd need to allow the state before the first volume key measurement and then each subsequent state. ( or if you bind to PCR[15] = 0, as some recommend, same deal ). So if PCR[15] = 0 is in the allow mask, and no measurements take place, then a foreign root system could be booted with your UKI and systemd-pcrlock would have all its protection masks fulfilled, and so the foreign root system would have access to pcrlock. This sort of defeats the point of using PCR[15] in the protection mask in the first place.
Describe the solution you'd like
A simple solution to protect against the issue would be to add a separator like systemd-pcrosseperator to PCR[15]. When systemd-pcrphase measures leave-initrd into PCR[11], the same measurement could be made into PCR[15].
I have a simple systemd unit that I include in my initrd, see here, that measures a separator into PCR[15] at the end of initrd, and would fail the boot even if this couldn't be measured.
The effect is that if any of tpm2-measure-pcr=yes measurements was absent, PCR[15] would have just the separator measured at the end of initrd, and this state is not allowed by my pcrlock policy, thus immediately locking that for good, and preventing the potential access in a foreign root system.
Describe alternatives you've considered
No response
The systemd version you checked that didn't have the feature you are asking for
262
- Lenguaje dominante
- C
- Estrellas
- 17k
- Forks
- 4.8k
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 342
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 systemd/systemd
-
login
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
hwdb needs-patch
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
systemd/systemd#44825 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
cryptsetup
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
documentation pid1
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
needs-better-log-message network RFE 🎁
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
systemd/systemd#44563 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de systemd/systemd
Issues similares
-
polish
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ChupathingyCE/chupathingyce#1366 ·
Los mantenedores suelen responder en 1 día
-
slice track:dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Life-Framework/Life-Framework#1831 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
-
bug intrinsic low priority wrong result
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día