proftpd mod_copy issue (CVE-2015-3306)

Bug #1462311 reported by ft
356
This bug affects 20 people
Affects Status Importance Assigned to Milestone
Proftpd Dfsg
Fix Released
Critical
proftpd-dfsg (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Medium
Unassigned
Trusty
Fix Released
Medium
Unassigned

Bug Description

The CVE-2015-3306 problem is arround for some time now and is not fixed in 12.04 and 14.04 LTS versions.
http://people.canonical.com/~ubuntu-security/cve/2015/CVE-2015-3306.html

I also tested it with telnet.
I can copy files without any authentication if mod_copy is enabled (mod_copy is per default enabled!)
The module is very usefull. I would be happy if I can re enable it on my servers.

Debian and other distributions have already fix this in their systems.
http://bugs.proftpd.org/show_bug.cgi?id=4169
https://security-tracker.debian.org/tracker/CVE-2015-3306
https://www.debian.org/security/2015/dsa-3263

Is there a special reason why this still not fixed on the LTS versions of Ubuntu?

CVE References

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. Since the package referred to in this bug is in universe or multiverse, it is community maintained. If you are able, I suggest coordinating with upstream and posting a debdiff for this issue. When a debdiff is available, members of the security team will review it and publish the package. See the following link for more information: https://wiki.ubuntu.com/SecurityTeam/UpdateProcedures

Changed in proftpd-dfsg (Ubuntu):
status: New → Incomplete
information type: Private Security → Public Security
Revision history for this message
ft (ft-8) wrote :

This is a little bit high for me.
I downloaded the debian/ubuntu pakages and created debdiffs (debdiff debian ubuntu)
I hope this helps somehow.

The pakages and the diffs are in the attachment.

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Hi ft - unfortunately, there are no usable debdiffs in the tar file that you uploaded. Instructions on the security update packaging process can be found here:

  https://wiki.ubuntu.com/SecurityTeam/UpdatePreparation#Packaging

no longer affects: proftpd-dfsg
Changed in proftpd-dfsg:
importance: Unknown → Critical
status: Unknown → Fix Released
Revision history for this message
BlueT - Matthew Lien - 練喆明 (bluet) wrote :

Has this been released to 14.04 LTS?

Revision history for this message
Anton Statutov (astatutov) wrote :

This has not been fixed in 14.04 LTS. Came here after discovering hacking attempts. Sadly.

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Anton, are you able to provide updates? See https://wiki.ubuntu.com/SecurityTeam/UpdatePreparation for some information on preparing updates.

Thanks

Revision history for this message
RedShift (redshift-gmx) wrote :

Need help on this one?

Mingye Wang (artoria2e5)
description: updated
Revision history for this message
TomaszChmielewski (mangoo-wpkg) wrote :

Any update on these? I'm seeing ubuntu 14.04 servers hacked regularly because of this vulnerability.

Upstream released the fix a year ago or so already!

cd311 (cd311)
Changed in proftpd-dfsg (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Seth Arnold (seth-arnold) wrote :

Thomasz, are you able to provide updates? See https://wiki.ubuntu.com/SecurityTeam/UpdatePreparation for some information on preparing updates.

Thanks

Revision history for this message
TomaszChmielewski (mangoo-wpkg) wrote :

I think backporting a package from 16.04 should be enough?

Revision history for this message
Brian Morton (rokclimb15) wrote :

Attaching debdiff of upstream patch for trusty package. Precise is also vulnerable, so I will mark that as well while I work on that next.

My primary test before/after patch:

220 ProFTPD 1.3.5rc3 Server (Debian) [::ffff:10.129.53.2]
USER bmorton
331 Password required for bmorton
PASS *******
230 User bmorton logged in
site cpfr /etc/passwd
350 File or directory exists, ready for destination name
site cpto /tmp/passwd.copy
250 Copy successful

220 ProFTPD 1.3.5rc3 Server (Debian) [::ffff:10.129.53.2]
site cpfr /etc/passwd
Connection closed by foreign host.

Revision history for this message
Brian Morton (rokclimb15) wrote :

Attaching debdiff of upstream patch for precise. Tested in same manner as trusty.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Upstream patch applied for trusty" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Brian Morton (rokclimb15) wrote :

Adding reworked patch for trusty that fixes an API issue with returning the error code/message and is more minimal and appropriate for a backported fix.

Revision history for this message
Brian Morton (rokclimb15) wrote :

Adding reworked patch for precise that fixes an API issue with returning the error code/message and is more minimal and appropriate for a backported fix.

Mathew Hodson (mhodson)
Changed in proftpd-dfsg (Ubuntu):
importance: Undecided → Medium
tags: removed: cve-2015-3306
tags: added: precise trusty
Tyler Hicks (tyhicks)
Changed in proftpd-dfsg (Ubuntu Precise):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Tyler Hicks (tyhicks)
Changed in proftpd-dfsg (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Tyler Hicks (tyhicks)
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Hi Brian - Thanks for the debdiffs and your work to improve the security of Ubuntu. :)

During my review of the debdiffs, I noticed a few minor issues:

1) I had to run the debdiffs through dos2unix to make the patch utility happy
2) I had to add a single newline to the end of the debdiffs to make the patch utility happy
3) I adjusted the precise version from 1.3.4a-2 to 1.3.4a-1ubuntu0.1, as documented in https://wiki.ubuntu.com/SecurityTeam/UpdatePreparation#Update_the_packaging

As mentioned, these were minor issues and everything else looked good to me.

As for the backport, I think it was probably a good idea that you left out the configuration changes. It would have been better if the testing changes could have been included (assuming that the tests are run at build time, I haven't checked) but the patch is simple enough that I have confidence that it is correct.

Thanks again. I'll be uploading these changes soon.

Tyler Hicks (tyhicks)
Changed in proftpd-dfsg (Ubuntu Precise):
status: In Progress → Confirmed
Changed in proftpd-dfsg (Ubuntu Trusty):
status: In Progress → Confirmed
Changed in proftpd-dfsg (Ubuntu Precise):
assignee: Tyler Hicks (tyhicks) → nobody
Changed in proftpd-dfsg (Ubuntu Trusty):
assignee: Tyler Hicks (tyhicks) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package proftpd-dfsg - 1.3.4a-1ubuntu0.1

---------------
proftpd-dfsg (1.3.4a-1ubuntu0.1) precise-security; urgency=low

  * SECURITY UPDATE: The mod_copy module in ProFTPD 1.3.4a allows remote
    attackers to read and write to arbitrary files via the site cpfr and
    site cpto commands. (LP: #1462311)
    - debian/patches/CVE-2015-3306.patch: adjust contrib/mod_copy.c to
      check authentication status. Based on upstream patch.
    - CVE-2015-3306

 -- Brian Morton <email address hidden> Sat, 4 Dec 2016 15:16:02 -0500

Changed in proftpd-dfsg (Ubuntu Precise):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package proftpd-dfsg - 1.3.5~rc3-2.1ubuntu2.1

---------------
proftpd-dfsg (1.3.5~rc3-2.1ubuntu2.1) trusty-security; urgency=low

  * SECURITY UPDATE: The mod_copy module in ProFTPD 1.3.5 allows remote
    attackers to read and write to arbitrary files via the site cpfr and
    site cpto commands. (LP: #1462311)
    - debian/patches/CVE-2015-3306.patch: adjust contrib/mod_copy.c to
      check authentication status. Based on upstream patch.
    - CVE-2015-3306

 -- Brian Morton <email address hidden> Sat, 4 Dec 2016 15:34:12 -0500

Changed in proftpd-dfsg (Ubuntu Trusty):
status: Confirmed → Fix Released
Tyler Hicks (tyhicks)
Changed in proftpd-dfsg (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.