Problem mit apt über https mit sources.list

Du kommst mit der Installation nicht voran oder willst noch was nachfragen? Schau auch in den "Tipps und Tricks"-Bereich.
Antworten
starbuck28
Beiträge: 33
Registriert: 09.04.2016 00:33:08

Problem mit apt über https mit sources.list

Beitrag von starbuck28 » 28.01.2019 21:55:17

Hallo Zusammen,

Die u. g. Sicherheitslücke in apt ist ja mittlerweile beseitigt und das System ist auch schon aktualisiert.

- -------------------------------------------------------------------------
Debian Security Advisory DSA-4371-1 security@debian.org
https://www.debian.org/security/ Yves-Alexis Perez
January 22, 2019 https://www.debian.org/security/faq
- -------------------------------------------------------------------------

Package : apt
CVE ID : CVE-2019-3462

Max Justicz discovered a vulnerability in APT, the high level package manager.
The code handling HTTP redirects in the HTTP transport method doesn't properly
sanitize fields transmitted over the wire. This vulnerability could be used by
an attacker located as a man-in-the-middle between APT and a mirror to inject
malicous content in the HTTP connection. This content could then be recognized
as a valid package by APT and used later for code execution with root
privileges on the target machine....

https://lists.debian.org/debian-securit ... 00010.html
Um die Sicherheit noch ein klein wenig zu erhöhen wollte ich das Aktualisieren der Paketquellen von http auf https umstellen.

Gar nicht so einfach, da es bei einigen Spiegelservern Probleme mit den SSL-Zertifikaten gibt.

Meine sources.list

Code: Alles auswählen

deb  http://deb.debian.org/debian/ stretch main
#deb-src https://deb.debian.org/debian/ stretch main

deb http://deb.debian.org/debian-security/ stretch/updates main contrib non-free
#deb-src https://deb.debian.org/debian-security/ stretch/updates main contrib n$

deb http://deb.debian.org/debian/ stretch-updates main contrib non-free
#deb-src https://deb.debian.org/debian/ stretch-updates main contrib non-free
Auf einer Neuinstallation in einer virtuellen Maschine hat das auch ohne
Probleme geklappt. Die Pakete werden über https geladen.

Auf einem bestehenden System mit Debian 9.7 funktioniert die
beschriebene Umstellung nicht.

Ich habe das System damals von Debian 6 (squeeze) auf Debian 8 (jessie)
und dann Debian 9 (strech) aktualisiert.

Das Update per https schlägt fehl.

Code: Alles auswählen

root@debian9:~# apt-get update
Ign:1 https://deb.debian.org/debian stretch InRelease
Ign:2 https://deb.debian.org/debian-security stretch/updates InRelease
Ign:3 https://deb.debian.org/debian stretch-updates InRelease
Err:4 https://deb.debian.org/debian stretch Release

Err:5 https://deb.debian.org/debian-security stretch/updates Release

Err:6 https://deb.debian.org/debian stretch-updates Release

Reading package lists... Done
E: The repository 'https://deb.debian.org/debian stretch Release' does
no longer have a Release file.
N: Updating from such a repository can't be done securely, and is
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user
configuration details.
E: The repository 'https://deb.debian.org/debian-security
stretch/updates Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user
configuration details.
E: The repository 'https://deb.debian.org/debian stretch-updates
Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user
configuration details.
root@debian9:~#
Ich habe keine Ahnung was hier schief läuft, da es auf dem anderen
System funktioniert.

Die gleichen Quellen (deb.debian.org) funktionieren z.B. über http ohne
Probleme.

Bei Verwendung von https kommt es zu diesem genannten Fehler.

Paket apt-transport-https habe ich installiert.

Es muss wohl einen Unterschied in der Konfiguration? zu den anderen
System geben, damit das Updaten als unsecure eingestuft wird.

Code: Alles auswählen

E: The repository 'https://deb.debian.org/debian stretch Release' does
no longer have a Release file.

N: Updating from such a repository can't be done securely, and is
therefore disabled by default.
Fragt sich aber bloß wieso?

Bin hier leider etwas ratlos...

Außerdem habe ich keinen Anhaltspunkt nach was ich suchen soll....

Gruß starbuck28

rendegast
Beiträge: 15041
Registriert: 27.02.2006 16:50:33
Lizenz eigener Beiträge: MIT Lizenz

Re: Problem mit apt über https mit sources.list

Beitrag von rendegast » 28.01.2019 22:29:26

deb.debian.org ist eine Umleitungsadresse.

Code: Alles auswählen

host deb.debian.org
Hast Du es mal mit Angabe eines speziellen mirror ausprobiert?
ZBsp.
https://ftp.gwdg.de/pub/linux/debian/debian/dists/
https://ftp.gwdg.de/pub/linux/debian/de ... ity/dists/ (für security)
Zuletzt geändert von rendegast am 28.01.2019 23:01:39, insgesamt 1-mal geändert.
mfg rendegast
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")

starbuck28
Beiträge: 33
Registriert: 09.04.2016 00:33:08

Re: Problem mit apt über https mit sources.list

Beitrag von starbuck28 » 28.01.2019 22:44:05

Das war es wohl leider nicht. Wäre ja auch zu einfach gewesen.

sources list:

deb https://ftp.gwdg.de/pub/linux/debian/debian/dists/ stretch main


apt-get update

Code: Alles auswählen

Ign:1 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch InRelease
Ign:2 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch Release
Ign:3 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main all Packages
Ign:4 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main armel Packages
Ign:5 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de
Ign:6 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de_DE
Ign:7 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-en
Ign:3 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main all Packages
Ign:4 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main armel Packages
Ign:5 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de
Ign:6 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de_DE
Ign:7 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-en
Ign:3 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main all Packages
Ign:4 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main armel Packages
Ign:5 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de
Ign:6 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de_DE
Ign:7 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-en
Ign:3 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main all Packages
Ign:4 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main armel Packages
Ign:5 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de
Ign:6 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de_DE
Ign:7 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-en
Ign:3 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main all Packages
Ign:4 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main armel Packages
Ign:5 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de
Ign:6 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de_DE
Ign:7 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-en
Ign:3 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main all Packages
Fehl:4 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main armel Packages
  404  Not Found
Ign:5 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de
Ign:6 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-de_DE
Ign:7 https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch/main Translation-en
Paketlisten werden gelesen... Fertig
W: The repository 'https://ftp.gwdg.de/pub/linux/debian/debian/dists stretch Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Fehlschlag beim Holen von https://ftp.gwdg.de/pub/linux/debian/debian/dists/dists/stretch/main/binary-armel/Packages  404  Not Found
E: Einige Indexdateien konnten nicht heruntergeladen werden. Sie wurden ignoriert oder alte an ihrer Stelle benutzt.

JTH
Moderator
Beiträge: 3023
Registriert: 13.08.2008 17:01:41
Wohnort: Berlin

Re: Problem mit apt über https mit sources.list

Beitrag von JTH » 28.01.2019 23:01:06

starbuck28 hat geschrieben: ↑ zum Beitrag ↑
28.01.2019 22:44:05
sources list:

deb https://ftp.gwdg.de/pub/linux/debian/debian/dists/ stretch main
Die Zeile ist nicht richtig, das dists/ ist zu viel.

War das evtl. auch der ursprüngliche Fehler im Zusammenhang mit deb.debian.org?
Manchmal bekannt als Just (another) Terminal Hacker.

rendegast
Beiträge: 15041
Registriert: 27.02.2006 16:50:33
Lizenz eigener Beiträge: MIT Lizenz

Re: Problem mit apt über https mit sources.list

Beitrag von rendegast » 28.01.2019 23:07:33

Die dists/-Links habe ich benutzt, da darin die zu beziehenden dist-Targets zu sehen sind.
Der Syntax ist
URL/dists/DIST/Release und
URL/dists/DIST/xxx/binary-.../Packages
wird zu
deb URL DIST xxx

Wobei xxx mehrfach sein kann, zBsp. das bekannte "main contrib non-free".
Zuletzt geändert von rendegast am 29.01.2019 00:02:44, insgesamt 1-mal geändert.
mfg rendegast
-----------------------
Viel Eifer, viel Irrtum; weniger Eifer, weniger Irrtum; kein Eifer, kein Irrtum.
(Lin Yutang "Moment in Peking")

starbuck28
Beiträge: 33
Registriert: 09.04.2016 00:33:08

Re: Problem mit apt über https mit sources.list

Beitrag von starbuck28 » 28.01.2019 23:30:47

Ok. Verstanden.

Habe die sources.list entsprechend angepasst und es funktioniert.
deb.debian.org ist eine Umleitungsadresse.
Verursacht dann vermutlich die Probleme, oder?

Fragt sich bloss warum es auf einem neu-installierten Systemen funktioniert und einem per dist-upgrade aktualisierten nicht.

JTH
Moderator
Beiträge: 3023
Registriert: 13.08.2008 17:01:41
Wohnort: Berlin

Re: Problem mit apt über https mit sources.list

Beitrag von JTH » 28.01.2019 23:38:00

starbuck28 hat geschrieben: ↑ zum Beitrag ↑
28.01.2019 23:30:47
deb.debian.org ist eine Umleitungsadresse.
Verursacht dann vermutlich die Probleme, oder?
Sollte es eigentlich nicht. Die Beschreibung sagt extra, dass auch https unterstützt ist:
deb.debian.org hat geschrieben: The redirection service is also available on HTTPS, so with the apt-transport-https package installed, you can use:

deb https://deb.debian.org/debian stable main
deb https://deb.debian.org/debian-security stable/updates main
Manchmal bekannt als Just (another) Terminal Hacker.

uname
Beiträge: 12075
Registriert: 03.06.2008 09:33:02

Re: Problem mit apt über https mit sources.list

Beitrag von uname » 29.01.2019 09:08:00

starbuck28 hat geschrieben:Um die Sicherheit noch ein klein wenig zu erhöhen wollte ich das Aktualisieren der Paketquellen von http auf https umstellen.
Du löst damit Sicherheitsprobleme, die eigentlich gar keine sind bzw. nicht in Verantwortung einer Transportverschlüsselung liegen.
Am Ende belastest du nur unnötig die Serversysteme.

Vergleich zu VPN:
Falls du z. B. VPN nutzt. Nutze VPN niemals über das gefährliche Internet. Deine VPN-Software könnte eine Sicherheitslücke haben. Verwende VPN nur über sichere Standleitungen.

Vergleich zu HTTPS:
Übertrage nie vertrauliche Daten über verschlüsselte Internet-Verbindungen direkt. TLS/SSL könnte Sicherheitslücken haben.
Verschlüssel alle Daten vorher extra und übertrage sie erst dann über HTTPS. Doppelt hält besser.

Antworten