-
CVSS Score
-The vulnerability is caused by a resource leak in the thread_amount function, which has different implementations for Windows and macOS. On Windows, the function fails to close a handle obtained from CreateToolhelp32Snapshot. On macOS, it fails to deallocate memory allocated by task_threads. The provided patch fixes both issues by adding the necessary resource-releasing calls (CloseHandle on Windows and mach_vm_deallocate on macOS) within the thread_amount function in the respective platform-specific files (src/windows.rs and src/osx.rs). Therefore, the thread_amount function is the vulnerable function on both platforms.
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| thread-amount | rust | < 0.2.2 | 0.2.2 |