Netatalk Security Advisory

Subject Out-of-bounds FD_SET write in the privileged afpd parent
CVE ID# CVE-2026-143955
Severity High
Disclosure Date 2026/12/04
Affected Versions 2.2.0-4.6.0
Summary A high-numbered IPC descriptor can cause the privileged afpd parent to abort when processing an AFP disconnect request

Description

The readt() and writet() timeout helpers in libatalk/util/socket.c use FD_SET() without checking whether the descriptor is below FD_SETSIZE (1024 on Linux/glibc). An oversized descriptor writes beyond the stack fd_set (CWE-787). A fortified glibc build detects the invalid index and terminates the process; without fortification, the write has undefined behavior.

The afpd parent retains an IPC socket and a hint pipe for each DSI session. With a configured connection limit above approximately 500 and sufficient system resources, a client can open enough sessions to push new parent IPC descriptors beyond FD_SETSIZE. After guest authentication, the client can send FPDisconnectOldSession with an arbitrary reconnect token. The child sends IPC_DISCOLDSESSION to the parent, which reads a separate two-byte DSI request ID through readt(). If that read returns EAGAIN, the helper passes the oversized descriptor to FD_SET().

The reported reproduction used approximately 620 sessions with max connections = 640 and the uams_guest.so guest authentication method. These are supported, non-default settings. With guest access enabled, an unauthenticated remote client can reach the vulnerable path without a password. Without guest access, the client needs valid credentials. The default max connections = 200 does not raise the parent’s descriptors to the vulnerable range under the reported conditions.

On a fortified glibc build, the out-of-bounds write aborts the privileged afpd parent, preventing new AFP connections until the daemon restarts. Existing child sessions may continue temporarily. Confidentiality loss, integrity impact, and code execution have not been demonstrated.

Patch Availability

Upgrade to Netatalk 4.6.1 or later, which includes the fix. Source builds can apply CVE-2026-143955.patch.

CVSS Calculation

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N (8.2)

Workaround

Until upgraded, keep max connections at its default value of 200. If a higher limit is required, remove uams_guest.so from uam list to prevent unauthenticated exploitation; authenticated clients may still reach the flaw.

Credits

Vulnerability reported by:

Pavel Kohout of Aisle Research

Patch developed by:

Daniel Markstedt of the Netatalk team

References


Go back to the Security Policy.