fspy does not record file accesses of static programs on kernels without process_vm_readv
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
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- linux, rust
- Área
- operating-systems
Línea de trabajo
Start by reading crates/fspy_seccomp_unotify/src/supervisor/handler/arg.rs:47 and the error handling in crates/fspy_seccomp_unotify/src/supervisor/mod.rs:121. Reproduce with cargo test -p fspy --test static_executable on a kernel where process_vm_readv returns ENOSYS, then add or verify fallback behavior for /proc/<pid>/mem and incomplete tracking. Done means static-program file accesses are recorded on affected kernels and the cache does not retain incomplete results.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
Some Linux kernels do not have the process_vm_readv system call. On these kernels, fspy does not record the file accesses of static programs. The task shows no error.
If you change a file that a static program read, the cache does not detect the change. Then the vp run command uses the old cached output.
On musl builds, fspy uses seccomp for all programs, so this problem affects every tracked program (not tested).
Affected kernels
The CONFIG_CROSS_MEMORY_ATTACH kernel option adds the process_vm_readv system call. The following kernels do not set this option:
- Kata Containers guest kernels. Kata builds these kernels from a configuration that has all options off. Then Kata adds only the options that it needs.
- The default kernel of Apple
container. This kernel is the Kata 3.32.0 kernelvmlinux-6.18.35-197. The/proc/config.gzfile of this kernel shows# CONFIG_CROSS_MEMORY_ATTACH is not set.
The default value of this option is y. Most distribution kernels set it.
Cause
For static programs, fspy intercepts system calls with seccomp. The supervisor process then reads each path argument from the memory of the program.
- The supervisor reads the memory only with the
process_vm_readvsystem call (crates/fspy_seccomp_unotify/src/supervisor/handler/arg.rs:47). - On the affected kernels, the
process_vm_readvsystem call fails with theENOSYSerror. - The supervisor ignores the error and lets the intercepted system call continue (
crates/fspy_seccomp_unotify/src/supervisor/mod.rs:121). - fspy does not record the access.
Steps to reproduce
- Start a Fedora virtual machine (VM) with Apple
containerand its default kernel. - In the VM, check out commit
b182c9be. - Run
cargo test -p fspy --test static_executable.
Result: 9 of 10 tests fail. Only the readdir test passes, because that test does not read the memory of the program. In each failed test, fspy records only the execution of the test program:
Expected accesses to /hello to match, as (actual, expected): [].
All accesses: [Read(".../fspy-test-bin"), Read(".../fspy-test-bin")]
I also tested a child process in the same VM:
- The
process_vm_readvsystem call fails with theENOSYSerror. - A read of the
/proc/<pid>/memfile at the same address returns the correct data.
Possible fixes
- If the
process_vm_readvsystem call fails with theENOSYSerror, read the/proc/<pid>/memfile with thepreadsystem call. This file does not need the kernel option. Reads of this file use the same permission check as theprocess_vm_readvsystem call. I have not tested this fix in fspy. - If the supervisor cannot read an access, do not cache the task. vite-task already does this with the
TrackingIncompletereason when the access channel is full. This fix also covers other read errors, such as permission errors.
- Lenguaje dominante
- Rust
- Estrellas
- 478
- Forks
- 48
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 72
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- 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 voidzero-dev/vite-task
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
voidzero-dev/vite-task#860 ·
Los mantenedores suelen responder en 1 día
-
Concurrent cache hits for the same task fail to restore outputs with "File exists (os error 17)"Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
voidzero-dev/vite-task#846 ·
Los mantenedores suelen responder en 1 día
-
Windows: automatic filesystem tracking makes Git/MSYS sh.exe fail with MapViewOfFileEx error 487Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
voidzero-dev/vite-task#830 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
voidzero-dev/vite-task#822 · 1 comentario · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Let tools mark cache directories with CACHEDIR.TAGPosiblemente ocupada @lifeiscontent la tomó hace 16 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
voidzero-dev/vite-task#793 ·
Los mantenedores suelen responder en 1 día
Todos los issues de voidzero-dev/vite-task
Issues similares
-
Make major, minor, and makedev safe on solarish targetsPosiblemente ocupada @xtqqczze la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Proxy ignores l5d-retry-http and l5d-retry-grpc conditions that follow a comma and spacePosiblemente ocupada @RaphaelFakhri la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 3 días
-
sncast panics when decoding a `u384` valuePosiblemente ocupada @RaphaelFakhri la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
foundry-rs/starknet-foundry#4635 ·
Los mantenedores suelen responder en 3 días
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
crmne/omastats#31 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
area:desktop priority:p2 type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día