Bug#802625: libvdpau crashes on 64-bit machines when DRI_PRIME env variable set

Luca Boccassi luca.boccassi at gmail.com
Fri Oct 23 01:00:19 UTC 2015


On Thu, 2015-10-22 at 08:30 +0100, Luca Boccassi wrote:
> On Oct 21, 2015 20:39, "Rinat" <ibragimovrinat at mail.ru> wrote:
> >
> > Source: libvdpau
> > Version: 1.1.1-1
> > Severity: important
> > Tags: patch
> >
> > Dear Maintainer,
> >
> > recent version of libvdpau have switched from getenv() to
> secure_getenv(),
> > but due to the missing definition, prototype of secure_getenv() is
> missing.
> > Normally, it would return (char *) as getenv() do, but with missing
> prototype,
> > compiler assumes returning of (int), which clamps 64-bit pointer to
> lower
> > 32-bit part. That have no effect on 32-bit installations, but on
> 64-bit
> > machines results in a corrupted pointer, and subsequent crash.
> >
> > Issue triggers only if system is 64-bit and DRI_PRIME environment
> variable
> > set.
> >
> > Patch fixing the issue was already pushed to the upstream
> repository, in [1]
> > just after libvdpau-1.1.1 release.
> >
> > Please, consider applying the patch to the package.
> >
> >
> > [1]
> http://cgit.freedesktop.org/~aplattner/libvdpau/patch/?id=1cda354bdfd0c9ca107293b84b52f4464fdbedcc
> 
> Hi,
> 
> Thanks for the report.
> 
> Since upstream merged this almost 2 months ago but there's no new
> release it sounds like a good idea to cherry pick it. I'll test it
> later tonight.

It was very trivial to reproduce on a 64 bit machine by running:

DRI_PRIME=1 vdpauinfo

Instantly causes a segmentation fault as reported.

I have tested on Jessie 64bit (and built i386 too) a new version with
the cherry-picked patch and verified it's not happening anymore.

I pushed it to Git. Andreas, Vincent, could you please do a new upload
when you have time and you are happy with the changes? Thank you!

Kind regards,
Luca Boccassi



More information about the pkg-nvidia-devel mailing list