Live data from Hacker News

Remote code execution vulnerability in apt/apt-get

justi.cz

161–166 of 166 posts

Re: Remote code execution vulnerability in apt/apt-get

#161
So how do I safely update apt to the patched version on Debian Jessie?

It's apparently fixed in version 1.0.9.8.5: https://security-tracker.debian.org/tracker/CVE-2019-3462

...but the suggested apt -o Acquire::http::AllowRedirect=false update fails because security.debian.org wants to do a redirect.

Manually downloading the packages listed in the announcement doesn't work either, since that's the Stretch version.

I can get the source package here: https://packages.debian.org/jessie/apt

...but the key is not in /usr/share/keyrings/debian-archive-keyring.gpg. (And I'm not entirely sure how to build a source package.)

I tried adding a different source, as suggested in the announcement:

  deb http://cdn-fastly.deb.debian.org/debian-security stable/updates main
...but it seems it can't find the right versions of all the dependencies:

  # apt -o Acquire::http::AllowRedirect=false install apt apt-utils libapt-pkg5.0 libapt-inst2.0 liblz4-1
  ...
  The following packages have unmet dependencies:
   libapt-pkg5.0 : Depends: liblz4-1 (>= 0.0~r127) but 0.0~r122-2 is to be installed
  E: Unable to correct problems, you have held broken packages.

Re: Remote code execution vulnerability in apt/apt-get

#162
post #81
post #15

It seems debian testing and unstable are still vulnerable: https://security-tracker.debian.org/tracker/CVE-2019-3462

Fixed apt has been just uploaded to unstable: https://packages.qa.debian.org/a/apt/news/20190122T190408Z.h...

It's now in testing, too.

Re: Remote code execution vulnerability in apt/apt-get

#163
post #161

So how do I safely update apt to the patched version on Debian Jessie? It's apparently fixed in version 1.0.9.8.5: https://security-tracker.debian.org/tracker/CVE-2019-3462 ...but the suggested apt -o Acquire::http::AllowRedirect=false update fails because security.debian.org wants to do a redirect. Manually downloading the packages listed in the announcement doesn't work either, since that's the Stretch version. I c…

No idea why would would security.debian.org make a redirect. Can you paste the whole error message?

Regarding the other error, jessie ≠ stable. You want "jessie/updates", not "stable/updates".

Re: Remote code execution vulnerability in apt/apt-get

#164

Earlier quoted context omitted.

With HTTP an attacker still has to MITM the connection between you and the mirror operator. So, definitely not "everyone".

That includes: coffee shops, ISPs, employers, everyone who can hack their routers, anyone who can spoof DNS, etc. That might as well be "everyone". STOP IT. Though shall use HTTPS.

Fair enough. I agree that HTTPS is valuable here. I was just being overly pedantic, my bad.

Re: Remote code execution vulnerability in apt/apt-get

#165
post #157

Earlier quoted context omitted.

The downloads are in an HTTPS page leading to HTTPS download links, and HTTP redirects to HTTPS: https://support.apple.com/downloads/quicktime for instance.

> and HTTP redirects to HTTPS ...or to anywhere a MITM attacker wants to redirect you.

I guess some people disagree?

But if any response in the redirect chain is served over HTTP, it can be replaced with a different response containing any "Location" header of the attacker's choosing instead of the original one. So it doesn't matter if the eventual intended URL is an HTTPS URL, because it will never be reached. The redirect will go to the attacker's site instead. (And in the case of a download, the user will never notice because the file URL is usually not prominently displayed.)

So a HTTP response anywhere in a redirect chain is equivalent to serving it over HTTP. Perhaps this was exactly the point of the parent post, but I thought it would be useful to make it explicit.

Re: Remote code execution vulnerability in apt/apt-get

#166
post #163
post #161

So how do I safely update apt to the patched version on Debian Jessie? It's apparently fixed in version 1.0.9.8.5: https://security-tracker.debian.org/tracker/CVE-2019-3462 ...but the suggested apt -o Acquire::http::AllowRedirect=false update fails because security.debian.org wants to do a redirect. Manually downloading the packages listed in the announcement doesn't work either, since that's the Stretch version. I c…

No idea why would would security.debian.org make a redirect. Can you paste the whole error message? Regarding the other error, jessie ≠ stable. You want "jessie/updates", not "stable/updates".

Ah, silly blind copy-pasting on my part. With "jessie/updates" it works. Thanks!

The message I was referring to, which looks like it's indicating that security.debian.org is trying to redirect:

  # apt -o Acquire::http::AllowRedirect=false update
  ...
  Err http://security.debian.org jessie/updates/main Sources
    302  Found [IP: 217.196.149.233 80]
  Err http://security.debian.org jessie/updates/main amd64 Packages
    302  Found [IP: 217.196.149.233 80]
  Err http://security.debian.org jessie/updates/non-free amd64 Packages
    302  Found [IP: 217.196.149.233 80]
  Err http://security.debian.org jessie/updates/main i386 Packages
    302  Found [IP: 217.196.149.233 80]
  Err http://security.debian.org jessie/updates/non-free i386 Packages
    302  Found [IP: 217.196.149.233 80]
  Fetched 422 kB in 2s (169 kB/s)
  W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/source/Sources  302  Found [IP: 217.196.149.233 80]

  W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages  302  Found [IP: 217.196.149.233 80]

  W: Failed to fetch http://security.debian.org/dists/jessie/updates/non-free/binary-amd64/Packages  302  Found [IP: 217.196.149.233 80]

  W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-i386/Packages  302  Found [IP: 217.196.149.233 80]

  W: Failed to fetch http://security.debian.org/dists/jessie/updates/non-free/binary-i386/Packages  302  Found [IP: 217.196.149.233 80]

  E: Some index files failed to download. They have been ignored, or old ones used instead.
Post reply on HN