GHSA-X3VJ-C8HW-4G7F
Files are closed without error check
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-X3VJ-C8HW-4G7F divulgada | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
### Impact
Several methods in the DragonFly2 codebase defer file close operations after writing to a file. This may introduce undefined behavior, as the file’s content may not be flushed to disk until the file has been closed.
Errors arising from the inability to flush content to disk while closing will not be caught, and the application may assume that content was written to disk successfully. See the example in figure 7.1.
file, err := os.OpenFile(t.DataFilePath, os.O_RDWR, defaultFileMode)
if err != nil {
return 0, err
}
defer file.Close()The bug occurs in multiple locations throughout the codebase.
The server on which the DragonFly2 application runs has a disk that periodically fails to flush content due to a hardware failure. As a result, certain methods in the codebase sometimes fail to write content to disk. This causes undefined behavior.
Patches
- Dragonfy v2.1.0 and above.
Workarounds
There are no effective workarounds, beyond upgrading.
References
A third party security audit was performed by Trail of Bits, you can see the full report https://github.com/dragonflyoss/dragonfly/blob/main/docs/security/dragonfly-comprehensive-report-2023.pdf.
If you have any questions or comments about this advisory, please email us at [dragonfly-maintainers@googlegroups.com](mailto:dragonfly-maintainers@googlegroups.com).
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/dragonflyoss/dragonfly |
Sin parche | — | — | v0.4.1 afectada |
2.1.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/dragonflyoss/dragonfly/security/advisories/GHSA-x3vj-c8hw-4g7fLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
