Description

A serious vulnerability has been discovered in the open-source disk-usage tool Duc (CVE-2025-13654). The flaw arises from a faulty check in the buffer-reading logic: when a crafted input provides a read length larger than the buffer size, an integer underflow causes the condition meant to prevent overflow to incorrectly pass. As a result, memory beyond the intended buffer can be read — leading to crashes (denial of service) or unintended disclosure of stack memory contents, potentially leaking sensitive data. This issue stems from how the function validates unsigned length fields (size_t). Subtracting the requested length from the total buffer length under flawed assumptions can wrap around, allowing the program to read arbitrary memory. Because no write is performed, the risk lies in stack data exposure or destabilization of the application under certain workloads. Any version of Duc prior to 1.4.6 is impacted, and the vulnerability may surface anywhere Duc processes untrusted or malformed input — especially in automated or shared environments. To mitigate this vulnerability, any deployment using Duc should be upgraded immediately to version 1.4.6 or later. Until then, avoid feeding untrusted data into Duc, and limit its use to trusted sources only. Additionally, if Duc is part of automated pipelines or shared across users, consider sandboxing its operations or restricting execution permissions. Finally, audit logs and monitor for unusual crashes or memory-related errors, as they may indicate attempted exploitation or memory-leak activity.