Bug 711134

Summary: vsftpd: Do not create network namespace per connection
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: eteo, jskala, nagy.martin, pmatouse
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-23 05:19:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 734538    
Attachments:
Description Flags
Relevant feedftp script mentioned in Ubuntu BTS bug [2]
none
dmesg-oom.32.txt output mentioned in relevant Ubuntu BTS bug [2]
none
And finally the vmallocinfo.32.tar archive from Ubuntu BTS bug [2]
none
debian-vsftpd.patch none

Description Jan Lieskovsky 2011-06-06 16:04:49 UTC
It was found that vsftpd, Very Secure FTP daemon, when the network namespace
(CONFIG_NET_NS) support was activated in the kernel, used to create a new
network namespace per connection. A remote attacker could use this flaw
to cause memory pressure (kernel OOM killer protection mechanism to be
activated and potentially terminate vsftpd or arbitrary [vsftpd independent]
process, which satisfied the OOM killer process selection algorithm).

References:
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629373
[2] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/720095

Comment 1 Jan Lieskovsky 2011-06-06 16:22:08 UTC
CVE request:
[3] http://www.openwall.com/lists/oss-security/2011/06/06/8

Comment 2 Jan Lieskovsky 2011-06-06 16:53:08 UTC
Public PoC (from [2]):
======================

The test is started in this way:

$ for i in 1 2 3 4 5 6 7 8 ; do ./feedftp $i >/dev/null & done

What is observed during the test is that /proc/vmallocinfo grows continually with lines like the following being added:

0xffffe8ffff800000-0xffffe8ffffa00000 2097152 pcpu_get_vm_areas+0x0/0x790 vmalloc
0xffffe8ffffa00000-0xffffe8ffffc00000 2097152 pcpu_get_vm_areas+0x0/0x790 vmalloc
0xffffe8ffffc00000-0xffffe8ffffe00000 2097152 pcpu_get_vm_areas+0x0/0x790 vmalloc

Comment 3 Jan Lieskovsky 2011-06-06 16:55:43 UTC
Created attachment 503287 [details]
Relevant feedftp script mentioned in Ubuntu BTS bug [2]

Comment 4 Jan Lieskovsky 2011-06-06 16:56:58 UTC
Created attachment 503288 [details]
dmesg-oom.32.txt output mentioned in relevant Ubuntu BTS bug [2]

Comment 5 Jan Lieskovsky 2011-06-06 16:58:30 UTC
Created attachment 503289 [details]
And finally the vmallocinfo.32.tar archive from Ubuntu BTS bug [2]

Comment 9 Huzaifa S. Sidhpurwala 2011-09-21 06:10:32 UTC
Created attachment 524135 [details]
debian-vsftpd.patch

Comment 16 Huzaifa S. Sidhpurwala 2011-09-23 05:04:58 UTC
Statement:

Not vulnerable. This issue did not affect the versions of vsftpd as
shipped with Red Hat Enterprise Linux 4 or 5. Due to the correction of
a crash in vsftpd upon connect (BZ#548802), vsftpd on Red Hat Enterprise
Linux 6 is not vulnerable to this flaw either.