Netatalk before 3.2.1 has an off-by-one error and resultant heap-based buffer overflow because of setting ibuf[PASSWDLEN] to '\0' in FPLoginExt in login in etc/uams/uams_pam.c. 2.4.1 and 3.1.19 are also fixed versions.
The vulnerability occurs in the FPLoginExt function in the file etc/uams/uams_pam.c, where improper null termination (zeroing) is assigned to the element ibuf[PASSWDLEN] — an index one position beyond the declared password buffer boundary. This is a classic off-by-one error that causes overwriting of an adjacent byte on the heap. A remote attacker, by sending a specially crafted login request, can cause controlled heap memory structure corruption.
A remote, unauthenticated attacker can achieve arbitrary code execution (RCE) on a vulnerable system with Netatalk process privileges, as well as compromise the confidentiality, integrity, and availability of data.
Netatalk should be updated to version 3.2.1, 3.1.19, or 2.4.1 (depending on the branch in use). Patches are available in the project repository and are described in Security Advisory GHSA-8r68-857c-4rqc.
Netatalk in all versions before 3.2.1 (fixes were also introduced in versions 2.4.1 and 3.1.19)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HNetatalk
APPNetatalk3.2.02.0.0 – 2.4.1 (bez)3.0.0 – 3.1.19 (bez)
Related vulnerabilities
Heap-based buffer overflow w Netatalk (off-by-one w FPMapName)
A Type Confusion vulnerability was found in the Spotlight RPC functions in afpd in Netatalk 3.1.x before 3.1.1...
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Netatalk. Au...
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Netatalk. Au...
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Netatalk. Au...