{
if (AuthPass == false)
{
+ // Remove the 'old' InRelease file if we try Release.gpg now as otherwise
+ // the file will stay around and gives a false-auth impression (CVE-2012-0214)
+ string FinalFile = _config->FindDir("Dir::State::lists");
+ FinalFile.append(URItoFileName(RealURI));
+ if (FileExists(FinalFile))
+ unlink(FinalFile.c_str());
+
new pkgAcqMetaSig(Owner,
MetaSigURI, MetaSigURIDesc, MetaSigShortDesc,
MetaIndexURI, MetaIndexURIDesc, MetaIndexShortDesc,
-apt (0.8.15.10) UNRELEASEDunstable; urgency=low
+apt (0.8.15.10) unstable; urgency=high
[ David Kalnischkies ]
* algorithms.cc:
- put <brackets> around email addresses
* doc/po/de.po:
- apply typo-fix from Michael Basse, thanks! (LP: #900770)
+ * apt-pkg/acquire-item.cc:
+ - remove 'old' InRelease file if we can't get a new one before
+ proceeding with Release.gpg to avoid the false impression of a still
+ trusted repository by a (still present) old InRelease file.
+ Thanks to Simon Ruderich for reporting this issue! (CVE-2012-0214)
[ Chris Leick ]
* German manpage translation update
Correct fi translation for hash sum mismatches (lp:420403)
Thanks to Jani Uusitalo
- -- David Kalnischkies <kalnischkies@gmail.com> Tue, 06 Dec 2011 16:35:39 +0100
+ -- Michael Vogt <mvo@debian.org> Tue, 06 Mar 2012 14:14:26 +0100
apt (0.8.15.9) unstable; urgency=low
installaptold
}
+runtest2() {
+ prepare ${PKGFILE}
+ rm -rf rootdir/var/lib/apt/lists
+ signreleasefiles 'Joe Sixpack'
+ msgtest 'Cold archive signed by' 'Joe Sixpack'
+ aptget update 2>&1 | grep -E '^(W|E): ' > /dev/null && msgfail || msgpass
+
+ # New .deb but now an unsigned archive. For example MITM to circumvent
+ # package verification.
+ prepare ${PKGFILE}-new
+ find aptarchive/ -name InRelease -delete
+ find aptarchive/ -name Release.gpg -delete
+ msgtest 'Warm archive signed by' 'nobody'
+ aptget update 2>&1 | grep -E '^(W|E): ' > /dev/null && msgfail || msgpass
+ testequal "$(cat ${PKGFILE}-new)
+" aptcache show apt
+ failaptnew
+
+ # Unsigned archive from the beginning must also be detected.
+ rm -rf rootdir/var/lib/apt/lists
+ msgtest 'Cold archive signed by' 'nobody'
+ aptget update 2>&1 | grep -E '^(W|E): ' > /dev/null && msgfail || msgpass
+ testequal "$(cat ${PKGFILE}-new)
+" aptcache show apt
+ failaptnew
+}
+runtest2
+
+
DELETEFILE="InRelease"
runtest
DELETEFILE="Release.gpg"