pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48101: vsftpd hard coded AS-limit is to small - failed to run on NetBSD 6.1

>Number:         48101
>Category:       pkg
>Synopsis:       vsftpd hard coded AS-limit is to small - failed to run on 
>NetBSD 6.1
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 31 12:50:00 +0000 2013
>Originator:     Dr. W. Stukenbrock
>Release:        NetBSD 6.1
Dr. Nagler & Company GmbH
System: NetBSD test-s0 5.1.2 NetBSD 5.1.2 (NSW-WS) #3: Fri Dec 21 15:15:43 CET 
2012 wgstuken@test-s0:/usr/src/sys/arch/amd64/compile/NSW-WS amd64
Architecture: x86_64
Machine: amd64
        For "security reasons", vsftpd tries to avoid to use a large amount of 
virtual memory.
        For that reason it sets RLIMIT_AS to a fixed value defined in defs.h, 
if such a limit
        is present on the system.
        The hardcoded value is 100MB. On 6.1 the process is about 150MB after 
mapping the
        required libraries (without SSL-libs).
        So the hard coded value is to small ...
        Try to run vsftpd on NetBSD 6.1. After a connection is recieved, the 
mmap() for reading
        in the user config file will fail and the connection is closed again
        The following patch will increase the memory limit from 100MB to 300MB.
        Of couse a configurable value from the makefile would be better, but 
this works (for now).

--- defs.h.xx   2013-07-31 14:25:32.000000000 +0200
+++ defs.h      2013-07-31 14:25:40.000000000 +0200
@@ -19,7 +19,7 @@
 /* Must be at least the size of VSFTP_MAX_COMMAND_LINE, VSFTP_DIR_BUFSIZE and
-#define VSFTP_AS_LIMIT          100UL * 1024 * 1024
+#define VSFTP_AS_LIMIT          300UL * 1024 * 1024
 #endif /* VSF_DEFS_H */
        Remark: there is already a patch for defs.h and this one should be 
added to it.
                Please do not create another patch file for defs.h ...


Home | Main Index | Thread Index | Old Index