F_ADD_SEALS ignores writable shared mappings
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- c, linux, macos
- Área
- operating-systems
Línea de trabajo
Start from the F_ADD_SEALS handling for memfds and the region table that tracks the process's shared writable mappings; the issue's table gives the four probe cases to reproduce. Done means F_SEAL_WRITE returns EBUSY while a writable MAP_SHARED mapping exists, and the private and no-map cases still succeed. The per-inode count across forked processes is an open design question, so settle that approach with maintainers before writing code.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
On Linux, fcntl(F_ADD_SEALS, F_SEAL_WRITE) fails with EBUSY while a writable MAP_SHARED mapping of the memfd exists (memfd_add_seals calls mapping_deny_writable). F_SEAL_EXEC on a memfd whose mode has an execute bit implies F_SEAL_WRITE and fails the same way. elfuse accepts both.
A probe that creates a MFD_ALLOW_SEALING memfd, sizes it to 4096 bytes, optionally maps it PROT_READ|PROT_WRITE, then adds the seal:
| Case | Linux 6.12 (qemu lane) | elfuse |
|---|---|---|
F_SEAL_WRITE, shared writable map |
EBUSY, seals 0x0 |
0, seals 0x8 |
F_SEAL_EXEC on a 0777 memfd, shared writable map |
EBUSY, seals 0x0 |
0, seals 0x3e |
F_SEAL_WRITE, private map |
0, seals 0x8 | 0, seals 0x8 |
F_SEAL_WRITE, no map |
0, seals 0x8 | 0, seals 0x8 |
Linux counts writable mappings per inode, across every process. After a fork, an elfuse child is a separate host process with its own mappings, so a check against the calling process's region table alone would be right only until the first fork. The F_SEAL_WRITE case exists on main; the F_SEAL_EXEC case arrives with #421. Linux also refuses mmap(MAP_SHARED, PROT_WRITE) on a file that already carries F_SEAL_WRITE; that side has not been checked under elfuse.
- Lenguaje dominante
- C
- Estrellas
- 273
- Forks
- 29
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 17
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 sysprog21/elfuse
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 3 días
-
Dificultad 3/5 Medio día Aptitud para principiantes 62/100
Los mantenedores suelen responder en 3 días
Todos los issues de sysprog21/elfuse
Issues similares
-
Weekly fuzz run failedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
kubernetes-sigs/security-profiles-operator#3597 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
AFLplusplus/AFLplusplus#2903 ·
-
Clean up stale and inaccurate comments in the platform screen and input filesPosiblemente ocupada @RichStephens la tomó hoy. Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 88/100
FujiNetWIFI/fujinet-config#289 ·
Los mantenedores suelen responder en 1 día
-
[raylib] update to 6.2Abiertocategory:port-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
nasa/cFS-GroundSystem#272 ·