vdrleaktest in Video Disk Recorder (VDR) 1.6.0 places a zero-length directory name in the LD_LIBRARY_PATH

Bug #930700 reported by Zubin Mithra
260
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vdr (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This bug is related to CVE-2010-3387(which has been linked to this bug). There is another bug linked to the same CVE but does not deal with it(you can find it at https://bugs.launchpad.net/ubuntu/+source/vdr/+bug/669105).

The Maverick version of vdrtestleak contains the following line :-

LANG=C LD_LIBRARY_PATH="/usr/lib/debug;$LD_LIBRARY_PATH" \

Just a small test, when LD_LIBRARY_PATH is not set

$ echo "/usr/lib/debug;$LD_LIBRARY_PATH"
/usr/lib/debug;

According to the CVE, this is a security vulnerability. However, as ":" is the seperator, this does not seem to be a security vulnerability. The discussion at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598308 seems to suggest the same.

The patch suggested seems to be :-

-LANG=C LD_LIBRARY_PATH="/usr/lib/debug;$LD_LIBRARY_PATH" \
+LANG=C LD_LIBRARY_PATH="/usr/lib/debug:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \

In such a case, however, if LD_LIBRARY_PATH were not set, you would have something like the following:-

$ echo "/usr/lib/debug:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
/usr/lib/debug:

While the original issue seems to be a nonexploitable bug, I doubt that the patch might cause a security issue(if LD_LIBRARY_PATH is not set to anything).

CVE References

description: updated
Revision history for this message
Zubin Mithra (zubin-mithra) wrote :

I feel that this issue requires a CVE to be issued, please refer to a similar bug which had a CVE issued here => https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/930854

Revision history for this message
Zubin Mithra (zubin-mithra) wrote :

I was referring to the issue that would arise by using the upstream patch and not the current issue(for which there is CVE-2010-3387).

Sorry for the confusion.

Revision history for this message
Steve Beattie (sbeattie) wrote :

Zubin,

*If* the patch you showed had been used, yes, it would have introduced a security bug. However, please read the debian bug report completely, where it's pointed out that the fix that leaves the colon in place is wrong and is later addressed. The correct fix is:

-LANG=C LD_LIBRARY_PATH="/usr/lib/debug:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
+LANG=C LD_LIBRARY_PATH="/usr/lib/debug${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \

which is indeed the fix that went in to the debian package in1.6.0-19.1 , and by extension, the natty version. You can see the specific change here:

  http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/vdr/natty/revision/25#debian/vdrleaktest

So I'm failing to see where an additional CVE needs to be assigned. Can you please clarify?

Changed in vdr (Ubuntu):
status: New → Incomplete
Revision history for this message
Steve Beattie (sbeattie) wrote :

Ah, sorry, I'm the one that's confused, I see

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/vdr/natty/revision/24#debian/vdrleaktest

now. While it's true that CVE numbers can be assigned for incomplete fixes or fixes that introduce new vulnerabilities, the issue here is minor enough to not bother. But I'll ask for additional opinions on this.

Revision history for this message
Steve Beattie (sbeattie) wrote :

After discussing it with other members of the Ubuntu Security Team, I still believe this does not warrant an addition CVE number, as the buggy version only made it into the Debian and Ubuntu archives briefly and were not included in any formal released version.

However, if you disagree with this opinion, you can always ask for a CVE assignment on the oss-security email list http://oss-security.openwall.org/wiki/mailing-lists/oss-security . Either way, any proposed fix to vdr should include both commits that I listed above.

visibility: private → public
Revision history for this message
Zubin Mithra (zubin-mithra) wrote :

Oh, as they were not included in any formal released version I too think now that a CVE would be unnecessary. I'll attach a debdiff for the same asap.

Revision history for this message
Zubin Mithra (zubin-mithra) wrote :

Please find attached the debdiff for the same.

Revision history for this message
Steve Beattie (sbeattie) wrote :

Thanks, looks pretty good. The version needs a minor adjustment (ubuntu1.1 rather than 2, see documentation at https://wiki.ubuntu.com/SecurityTeam/UpdatePreparation#Update_the_packaging). Would you like to prepare a debdiff for lucid as well? It has the same code and should be entirely straightforward.

Thanks again for helping to improve Ubuntu!

Revision history for this message
Steve Beattie (sbeattie) wrote :

Oh, one more thing I needed to edit with your debdiff; security updates need to be targeted to RELEASE-security instead of just RELEASE, so in this case it needs to be targeted to maverick-security.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vdr - 1.6.0-18ubuntu1.1

---------------
vdr (1.6.0-18ubuntu1.1) maverick-security; urgency=low

  * SECURITY UPDATE: vdrleaktest in Video Disk Recorder (VDR) 1.6.0 places a
    zero-length directory name in the LD_LIBRARY_PATH, which allows local users
    to gain privileges via a Trojan horse shared library in the current working
    directory. (LP: #930700)
    - http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/vdr/natty/revision/24#debian/vdrleaktest
      and
      http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/vdr/natty/revision/25#debian/vdrleaktest
    - debian/vdrtestleak: changed to set LD_LIBRARY_PATH securely
    - CVE-2010-3387
 -- Zubin Mithra <email address hidden> Tue, 14 Feb 2012 10:38:34 -0800

Changed in vdr (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

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