CVE-2025-70085
KrytyczneStreszczenie
W OpenSatKit w wersji 2.2.1 odkryto problem związany z buforem EventErrStr, który ma stały rozmiar 256 bajtów. Kod używa funkcji sprintf do formatowania dwóch nazw plików bez sprawdzania długości, co może prowadzić do przepełnienia bufora na stosie.
Ocena ryzyka
Przepełnienie bufora na stosie może prowadzić do nieautoryzowanego dostępu do pamięci, co stwarza poważne zagrożenie dla bezpieczeństwa aplikacji i całej organizacji.
Rekomendacja
Zaleca się wprowadzenie walidacji długości danych wejściowych oraz użycie bezpieczniejszych funkcji formatowania, takich jak snprintf, aby zapobiec przepełnieniu bufora.
Oryginalny opis (angielski, źródło NVD)
An issue was discovered in OpenSatKit 2.2.1. The EventErrStr buffer has a fixed size of 256 bytes. The code uses sprintf to format two filenames (Source1Filename and the string returned by FileUtil_FileStateStr) into this buffer without any length checking and without using bounded format specifiers such as %.*s. If the filename length approaches OS_MAX_PATH_LEN (commonly 64-256 bytes), the combined formatted string together with constant text can exceed 256 bytes, resulting in a stack buffer overflow. Such unsafe sprintf calls are scattered across multiple functions in file.c, including FILE_ConcatenateCmd() and ConcatenateFiles(), all of which fail to validate the output length.

