Bug 1177840 - All Vala programs that use Gst.MapInfo() are vulnerable to heap buffer overflow due to a bug in Vala bindings for GStreamer
Summary: All Vala programs that use Gst.MapInfo() are vulnerable to heap buffer overfl...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: vala
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: CVE-2014-8154
TreeView+ depends on / blocked
 
Reported: 2014-12-30 19:32 UTC by Sergey "Shnatsel" Davidoff
Modified: 2015-12-02 16:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 06:39:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sergey "Shnatsel" Davidoff 2014-12-30 19:32:57 UTC
Due to incorrect buffer length declaration in Vala bindings for the Gst.MapInfo() function in Vala versions 0.26.0 and 0.26.1, binaries that use that function are vulnerable to heap buffer overflow, which may result in a crash or arbitrary code execution depending on the binary.

All binaried built with the buggy bindings package that use Gst.MapInfo() function are affected. Binaries such as shotwell-video-thumbnailer run this function on untrusted input, which probably makes this bug fairly easy to exploit.

How reproducible:

This bug is always observable on e.g. shotwell-video-thumbnailer when building the binary with the buggy bindings with Address Sanitizer.

Steps to Reproduce:

1. Build Shotwell vith a vulnerable Vala version and -fsanitize=address C compiler flag
2. Run "shotwell-video-thumbnailer /home/user/any-video.webm"
3. Observe the crash

Alternatively, you can observe shotwell-video-thumbnailer output garbage instead of valid thumbnails when built with the buggy bindings without Address Sanitizer.

Additional info:

A patch for the issue is available: https://git.gnome.org/browse/vala/commit/?id=3092537db65887e24a3d3e87a27caf9c5295e4f7

The issue was fixed in vala git master but not identified as a security vulnerability until I've independently discovered it.

To mitigate it, the patch above should be applied to the bindings and then all binaries using Gst.MapInfo() have to be rebuild with the fixed bindings.

I'm going to submit the information about this bug to distros for CVE allocation, which means it will be disclosed on the 12th of January. If you need more time to identify, rebuild and re-upload affected packages, please let me know ASAP!

Comment 1 Fedora End Of Life 2015-11-04 14:11:30 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2015-12-02 06:39:57 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.