]> git.saurik.com Git - apt.git/commit
SECURITY UPDATE: gpgv: Check for errors when splitting files (CVE-2016-1252)
authorJulian Andres Klode <jak@debian.org>
Mon, 5 Dec 2016 22:01:25 +0000 (23:01 +0100)
committerJulian Andres Klode <jak@debian.org>
Thu, 8 Dec 2016 14:19:21 +0000 (15:19 +0100)
commit51be550c5c38a2e1ddfc2af50a9fab73ccf78026
tree08d21bb6de79a20b1355c69d04bd1eb1f7cf91dc
parent6761dae5d0c372d132b0df91753120b59e30fd0e
SECURITY UPDATE: gpgv: Check for errors when splitting files (CVE-2016-1252)

This fixes a security issue where signatures of the
InRelease files could be circumvented in a man-in-the-middle
attack, giving attackers the ability to serve any packages
they want to a system, in turn giving them root access.

It turns out that getline() may not only return EINVAL
as stated in the documentation - it might also return
in case of an error when allocating memory.

This fix not only adds a check that reading worked
correctly, it also implicitly checks that all writes
worked by reporting any other error that occurred inside
the loop and was logged by apt.

Affected: >= 0.9.8
Reported-By: Jann Horn <jannh@google.com>
Thanks: Jann Horn, Google Project Zero for reporting the issue
LP: #1647467
apt-pkg/contrib/gpgv.cc