From: Ralph Boehme Date: Sat, 5 Jul 2014 06:14:41 +0000 (+0200) Subject: Hangs in Netatalk which causes it to stop responding to connections X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=e9391ff790167e35ff92adc20d4779f1d9d651aa;hp=e9391ff790167e35ff92adc20d4779f1d9d651aa;p=netatalk.git Hangs in Netatalk which causes it to stop responding to connections Hangs in Netatalk which causes it to stop responding to connections. The master afpd process gets stuck in a poll loop, being repeatedly notified that there are connections on its socket, but never actually doesn anything with them. Analysis with gdb revealed that the dat astructure dealing with the main AFP socket and the IPC client sockets was smashed. This could happen because the function fdset_add_fd() doesn't do bound checking itself but relied on other parts of the code that enforce a connection limit. Unfortunately, for low-level AFP connections that don't result in a full AFP login these checks come too late resulting in a buffer overflow. Add a bound check. While we're at it, rewrite the fdset code to use a full blown data structure 'struct asev' encapsultating the implementation details. Fixes bug #572. Signed-off-by: Ralph Boehme ---