CVE-2026-45699: Netatalk has Integer Underflow → Stack Buffer Overflow in copydir()
Netatalk is a Free and Open Source file server suite for Unix-like operating systems. In versions 3.1.19 through 4.4.2, a stack-based buffer overflow exists in the copydir() function of Netatalk's afpd daemon due to an integer underflow in the calculation of the remaining buffer size used for path construction. copydir() is a utility function called when a file operation crosses a device boundary inside an AFP shared volume, which the standard library's renameat() cannot handle. The function attempts to track available buffer space using srem and drem for source and destination paths. Incorrect arithmetic causes both srem and drem to underflow to SIZEMAX. Consequently, boundary checks against strlen(de->dname) always pass, allowing strcpy() to append filenames into nearly full stack buffers. Version 4.4.3 patches the issue. As a workaround, configure each AFP shared volume to be structured as a single file system, in other words no subdirectory of a shared volume should be a mount point for a different file system.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Netatalk (afpd daemon)to a version that resolves this vulnerability.Fixed in 4.4.3 - Configuration
As a workaround, configure each AFP shared volume so it is structured as a single file system: do not use any subdirectory of a shared volume as a mount point for a different file system.
Netatalk AFP shared volumes (afpd) shared volume mount structure = single file system per AFP shared volume (no subdirectory mount points for different file systems)
Event History
Frequently Asked Questions
What is the severity of CVE-2026-45699?
The severity of CVE-2026-45699 is rated high with a score of 7.5.
How do I fix CVE-2026-45699?
To fix CVE-2026-45699, upgrade Netatalk to version 4.4.3 or later.
What types of vulnerabilities are associated with CVE-2026-45699?
CVE-2026-45699 involves an integer underflow and a stack buffer overflow.
What versions of Netatalk are affected by CVE-2026-45699?
Netatalk versions 3.1.19 through 4.4.2 are affected by CVE-2026-45699.
What components of Netatalk should I be concerned about with CVE-2026-45699?
The vulnerability in CVE-2026-45699 specifically affects the afpd daemon in Netatalk.