I received the below from
Chris.
Hi,
Thanks for contacting me about this.
It's an interesting report -- probably the only substantive vsftpd bug I've had
in a long time.
vsftpd isn't really maintained by me any more (the Linux distributions do it).
That said, I've got an alternative patch that I think might tackle the root
cause of this. I've pasted it below, I hope it's useful.
Cheers
Chris
--- a/standalone.c
+++ b/standalone.c
@@ -228,7 +228,7 @@ vsf_standalone_main(void)
die("accept");
}
- ++s_children;
+ __sync_fetch_and_add(&s_children, 1);
@@ -251,7 +251,7 @@ vsf_standalone_main(void)
/* fork() failed, drop the count back out */
drop_ip_count(p_raw_addr);
- --s_children;
+ __sync_fetch_and_sub(&s_children, 1);
@@ -302,7 +302,7 @@ handle_sigchld(void* duff)
/* Account for the child dying */
- --s_children;
+ __sync_fetch_and_sub(&s_children, 1);
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2172433
Title:
vsftpd: possible s_children underflow in standalone.c causes false
"too many connected users"
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vsftpd/+bug/2172433/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs