News for hackers. Stuff that matters.
Re:51% of 4M Docker images have critical vulnerabilities by tannhaeuser on Thursday December 17, 2020 @08:49AM (#25455506)
No shit, a mechanism to bake pinned shared libs into a static archive to counter version dependencies on Ubuntu/Debian vs RedHat Linuxen grows stale, fossilized images? Who would've thought!

As much as I love Docker for development, going all-in on containers for prod was a huge mistake. Which is becoming clearer now that RedHat pulls free CentOS images, after taking the so-called Linux community further and further away from POSIX and other portability means with systemd, namespaces, oci, and whatnot.

Re:51% of 4M Docker images have critical vulnerabilities by oblio on Thursday December 17, 2020 @08:53AM (#25455547)
Docker images should be treated the same way as you'd treat any library you use or any package you create.

Do you think Java .jars in Maven repos or .NET .dlls in Nuget are faring any better?

Find solid dependencies, don't use too many of them, make sure you update them, use static analysis tools and dependency scanners, etc. Same drill as for anything.

Re:51% of 4M Docker images have critical vulnerabilities by Frost1x on Thursday December 17, 2020 @09:44AM (#25455985)
>Find solid dependencies, don't use too many of them, make sure you update them, use static analysis tools and dependency scanners, etc. Same drill as for anything.

That's hilarious simply because most heavy Docker users I've interacted with basically use it as a way to build houses of cards which glue-sticked piles and piles of dependencies together rapidly.

This is largely because application complexity in some domains and expectations of development pace have ballooned to insanity but there are plenty of heavy Docker users that do this even when these sort of pressures don't exist.

I think as software progresses and more development techniques become easier to leverage and automated (correctly and incorrectly), we're getting to a point advanced statistical software packages have been at for quite some time: no matter what data you throw at the software for analysis and what analysis you choose, the software has so much experience baked into it that you'll get some result that makes assumptions what you're doing is valid that may look like reasonable outputs even if they aren't. If you do need to do some preprocessing, much of that is even automated so it's incredibly easy to do something very wrong if you dont know what you're doing but not realize it. Automation has made it much easier to fail late instead of fail early.

Re:51% of 4M Docker images have critical vulnerabilities by rhencke on Thursday December 17, 2020 @09:54AM (#25456074)
This was all achingly true well before Docker, though. (That's why Docker got popular, after all!)

Docker isn't the disease, its use in such manner is just a symptom.

Re:51% of 4M Docker images have critical vulnerabilities by evilduck on Thursday December 17, 2020 @10:21AM (#25456323)
The trouble is finding balance between simple DIY implementations or cobbling together a house of cards.

"Allow CRUD of names" ok, you'll have it next sprint. "Allow upload of their resumé docs" no problem, two more weeks. "Parse the docx and PDF files users upload and extract the contents and fill our db schema with relevant data". Well shit. The specs to understand either of those formats are gigantic and now I'm forced to cobble together something using more dependencies if you want it done in less than two year's time.

Re:51% of 4M Docker images have critical vulnerabilities by incrudible on Thursday December 17, 2020 @10:33AM (#25456441)
Is it really that troublesome to strike a balance between implementing something yourself and using a library when the difference is two weeks versus two years?

If, for example, a file format is really complex, it has most likely one implementation that almost everyone uses. If there is a problem with it, you will hear about it. Use that.

On the other hand, if a file format is really simple or you only need a simple subset of it, rolling your own could avoid you getting 0-dayed when the most popular implementation has a vulnerability.

Re:51% of 4M Docker images have critical vulnerabilities by ComodoHacker on Thursday December 17, 2020 @11:32AM (#25457107)
>you getting 0-dayed when the most popular implementation has a vulnerability

vs getting hit when your vulnerable implementation becomes popular. Not an obvious choice indeed.

Re:51% of 4M Docker images have critical vulnerabilities by incrudible on Thursday December 17, 2020 @11:57AM (#25457388)
> vs getting hit when your vulnerable implementation becomes popular.

Which is not going to happen, because there's no point in publishing something that is tailored to your specific purpose.

Re:51% of 4M Docker images have critical vulnerabilities by ivanche on Thursday December 17, 2020 @12:55PM (#25458130)
This reminds me of one Finnish student publishing some sort of OS kernel in 1991 or so which supported only his PC-compatible machine...
Re:51% of 4M Docker images have critical vulnerabilities by incrudible on Thursday December 17, 2020 @01:04PM (#25458277)
Of course, who could rule out that a crappy little domain-specific parser turns into a trillion dollar industry? One should let that remote possibility guide the decision making at all times.
Re:51% of 4M Docker images have critical vulnerabilities by neodymiumphish on Thursday December 17, 2020 @06:17PM (#25461796)
Can confirm: my whole home server / coworker collaborative setup is run from a Docker house of cards...
Re:51% of 4M Docker images have critical vulnerabilities by marcosdumay on Thursday December 17, 2020 @10:27AM (#25456384)
Hum... Docker automatically adds an entire OS as static dependency to anything. How does that goes with "not using too many dependencies" rule?

Also, good luck doing static analysis on binary tools.

There's an entire area of work people call "ops" that specializes on managing that dependency. But they can only do that if it's dynamic and loosely coupled.

Re:51% of 4M Docker images have critical vulnerabilities by oblio on Thursday December 17, 2020 @10:38AM (#25456506)
Ummm...

You make your own images, if you really care. You involve your "ops" people in that.

They manage the base images that are then used by your dev team. They're responsible for updating the base images.

Your dev team provides a CI/CD pipeline which the ops team can use to check that security updates don't break functionality.

It's not rocket science.

Re:51% of 4M Docker images have critical vulnerabilities by cle on Thursday December 17, 2020 @12:13PM (#25457573)
Docker doesn’t add anything as a dependency, you do. Use “FROM scratch” if you want to run a process with nothing but the Linux kernel. You won’t even get libc.
Re:51% of 4M Docker images have critical vulnerabilities by pjmlp on Thursday December 17, 2020 @09:49AM (#25456034)
They definitely are, because each jar/dll doesn't have the whole world inside itself.

Docker is like shipping EAR + Websphere + OS in one package.

Re:51% of 4M Docker images have critical vulnerabilities by oblio on Thursday December 17, 2020 @10:18AM (#25456302)
Yeah, I know, but you'd use the same mechanism for both.

For jars/dlls you look up dependency scanners and hook them up to your CI/CD.

For Docker images you look up image scanners and hook them up to your CI/CD.

Re:51% of 4M Docker images have critical vulnerabilities by thu2111 on Friday December 18, 2020 @07:25AM (#25466398)
Realistically a lot of Java apps are shipped as fat JARs that do in fact include the (Java) world.

Hot-patching apps to use newer versions of JARs because of security bugs, outside of the update stream of the actual app itself, is not really a good idea due to the risk of regressions. Docker has basically codified the failure of dynamic linking in the real world.

Re:51% of 4M Docker images have critical vulnerabilities by mfer on Thursday December 17, 2020 @09:17AM (#25455740)
I think it was Kelsey Hightower who said that Kubernetes is a platform for building platforms.

Unfortunately, we've gotten very caught up with the boring infra parts (the containers and the orchestration of k8s). We too often forget about the other platform we should build that uses these tools.

People don't complain about mass security holes in Heroku. That's long been container based. That's an example of building a platform that enables keeping on top of security issues.

This isn't a problem of the tools we have. It's a problem because of how we use them and what we build with them.

Re:51% of 4M Docker images have critical vulnerabilities by dimitrios1 on Thursday December 17, 2020 @09:34AM (#25455878)
> People don't complain about mass security holes in Heroku.

That's because Heroku is mostly a closed platform that the average consumer does not have insight into.

You don't know what outdated dep the software that executes your dynos runs. As the case in many areas of life, ignorance is bliss.

Re:51% of 4M Docker images have critical vulnerabilities by mfer on Thursday December 17, 2020 @10:08AM (#25456196)
I just used Heroku as an example to show the architecture. FWIW, it looks like Heroku is using Kubernetes these days. It's a platform built on a platform.

If you want open platforms we can talk about cloud foundry. If a base image or buildpack has a vulnerability there is a process to update it and rebuild the containers for the running application without and app dev ever needing to know about or deal with it. This is considered a feature.

The idea is to look at the architecture, concerns, and how to handle different roles with different needs at different layers of the concerns.

I don't mean to hold up Heroku or Cloud Foundry as some amazing thing. Just that you can have an architecture that solves for these problems with containers.

Re:51% of 4M Docker images have critical vulnerabilities by ethbr0 on Thursday December 17, 2020 @11:43AM (#25457216)
Docker's security architecture problems definitely feel like a "Closed: Working as intended" / not prioritized, rather than something they see as a core feature.

And why not? They're shipping benefits (immediate productivity) and externalizing costs (eventual security breaches) onto the end user.

Re:51% of 4M Docker images have critical vulnerabilities by mfer on Thursday December 17, 2020 @12:53PM (#25458111)
Is the docker/container model supposed to be all things to all people? I don't think so.

Containers are a building block that let us handle one concern. They are a great tool for some things. But, to expect the app dev concern of "just run my code" to be solved by them well is missing the other concern.

I think Docker does some things well. I think this works as intended. I just think that we need other things that use these building blocks better to create better solutions at the right level of abstraction.

Re:51% of 4M Docker images have critical vulnerabilities by ethbr0 on Thursday December 17, 2020 @01:11PM (#25458359)
That feels like an abrogation of responsibility.

At this point in computing system complexity, secure defaults over configuration is a requirement for a sane system.

As we increasingly convert infrastructure into code, this means infrastructure configuration requires secure defaults as well.

That the Docker ecosystem doesn't seem overlying concerned (as a core, drop-everything, #1 priority) about a decades-hard security problem (detecting and resolving insecure dependencies) seems shortsighted.

To put it another way, there are two realities:

(A) No tooling support is provided to address a risk efficiently and quickly = no one addresses the risk

(B) Efficient, effective tooling is built, maintained as platform evolves, and advertised to the community = everyone does what they should

I realize the structure of Docker dissuades them from actually addressing (B), but it seems like an existential threat to adoption.

Re:51% of 4M Docker images have critical vulnerabilities by mfer on Thursday December 17, 2020 @01:41PM (#25458724)
> That feels like an abrogation of responsibility.

How often are people who deal with OS packages working on kernel level vulnerabilities or are dealing with microcode for CPUs? If someone is working on libc or libcurl are they supposed to follow and track all of the kernel level issues for every place the code would run?

I would argue that someone working on libcurl is working at a different layer in the stack than someone working on a kernel. libcurl can run on multiple kernels.

The same idea of layers is true when you're talking about someone working on a nodejs app and those OS layers.

> To put it another way, there are two realities: > (A) No tooling support is provided to address a risk efficiently and quickly = no one addresses the risk > (B) Efficient, effective tooling is built, maintained as platform evolves, and advertised to the community = everyone does what they should

I think Kelsey Hightower said it best when he said that Kubernetes is a platform for building platforms. I would argue that container systems in general are platforms for building platforms. I know people who spend a bunch of time building a platform on top of k8s at different companies.

Yet, in these conversation we keep coming back to Docker or container platforms as being the platform that app developers _should_ interact with. App devs speaking out, people like Kelsey speaking up, and security issues like this all say that maybe that _should_ is wrong.

Re:51% of 4M Docker images have critical vulnerabilities by sedachv on Thursday December 17, 2020 @02:53PM (#25459594)
> As much as I love Docker for development, going all-in on containers for prod was a huge mistake.

Containers are a great deployment mechanism for production. Unfortunately a lot of people seem to think that they are a substitute for package management. This was obviously (and I do mean very clearly obvious in advance from first principles¹, no hindsight needed) going to become a disaster. Most people just do not care - they are either completely unaware of the problem, or they know that in a few years' time they will either have changed jobs or be promoted (in no small part thanks to their "Docker thought leadership") and it will no longer be their problem (and they would still get to claim "Docker thought leadership" success on their résumés).

¹ Also from experience - VMware came out with "virtual appliances" in the mid-2000s that promised to do a lot of what Docker would later be used for.

Re:51% of 4M Docker images have critical vulnerabilities by dralley on Thursday December 17, 2020 @09:05AM (#25455645)
I've never heard anything about RH pulling free CentOS images, it looks like they're still there to me?

https://hub.docker.com/_/centos

They also have free RHEL container images.

https://www.redhat.com/en/blog/introducing-red-hat-universal...

Re:51% of 4M Docker images have critical vulnerabilities by walty8 on Thursday December 17, 2020 @09:12AM (#25455690)
I believe it's discussed here: https://news.ycombinator.com/item?id=25400249
Re:51% of 4M Docker images have critical vulnerabilities by dralley on Thursday December 17, 2020 @10:23AM (#25456348)
I don't interpret "pulling free CentOS images" as being the same thing as "pulling investment in CentOS" in a thread specifically about docker images.

Existing docker images are still there, future images will continue being pushed (but only for CentOS Stream post-2021), and UBI exists for minor releases of RHEL which is supposed to be identical to CentOS anyways.

And considering the fact that Docker containers don't use the kernel provided by the client OS, the difference between CentOS and CentOS Stream is even smaller than it already was. The most significant changes between minor releases of RHEL / CentOS are in the kernel.

Re:51% of 4M Docker images have critical vulnerabilities by feinte on Thursday December 17, 2020 @08:57AM (#25455581)
The problem lies in baking entire distribution into an image.

Using distroless images or "FROM scratch" with statically compiled app reduces the risks.

You still have to watch for your app dependencies updates but that's less work than for an entire distribution.

Re:51% of 4M Docker images have critical vulnerabilities by mattgreenrocks on Thursday December 17, 2020 @11:40AM (#25457182)
Huh, I didn't know that was possible. So you could specify an app container that is then overlaid atop the OS container?

I suppose installing the dependencies ends up being easier if you know they'll end up in, e.g. a ubuntu 18.04 image, hence that's what people do.

Re:51% of 4M Docker images have critical vulnerabilities by sam0x17 on Thursday December 17, 2020 @11:00AM (#25456735)
It has it's uses though. For example I used to work at a startup where this super finicky NodeJS script was written by a junior dev that ended up being the main deployment script for client build-outs on one of their products. Fast forward a few years, the old CEO contacts me because he still has a few clients using the platform and has no way of running the script. He pays me to try to get it to run on his machine -- I get it working on Ubuntu but will not run on his Mac because the Mac is no longer supported by whatever weird packages the junior dev was using. Long story short, Docker to the rescue -- now he has a baked-in image that will run that script forever.
Re:51% of 4M Docker images have critical vulnerabilities by ethbr0 on Thursday December 17, 2020 @11:45AM (#25457248)
This is how we end up with software archaeology as a profession. :D
Re:51% of 4M Docker images have critical vulnerabilities by diveanon on Thursday December 17, 2020 @01:17PM (#25458431)
* cryptoarchaeology
Re:51% of 4M Docker images have critical vulnerabilities by FpUser on Thursday December 17, 2020 @12:14PM (#25457595)
For this particular case VM might have more chances for long term survival.
Re:51% of 4M Docker images have critical vulnerabilities by sam0x17 on Sunday December 20, 2020 @04:03PM (#25489475)
I had worries about him updating it and/or changing the disk state to the point where it broke and not knowing how to use snapshots.
Re:51% of 4M Docker images have critical vulnerabilities by diveanon on Thursday December 17, 2020 @01:19PM (#25458443)
True, but I've taught non tech staff to use docker desktop to run qa and demo environment.
Re:51% of 4M Docker images have critical vulnerabilities by oxfordmale on Thursday December 17, 2020 @12:15PM (#25457602)
I only remember too well the pain of having to migrate from a legacy VM to a new one, having to figuring out all the software that was installed over the years. Docket is no magical bullet, but much better than managing VM. In our company we regularly force rebuilds of Dockets to ensure we pick up the latest changes
Re:51% of 4M Docker images have critical vulnerabilities by shuntress on Thursday December 17, 2020 @02:29PM (#25459338)
Using docker just forces you to solve the problem instead of continuing to put it off.

You don't need docker to automate your fresh install process.

Re:51% of 4M Docker images have critical vulnerabilities by oxfordmale on Thursday December 17, 2020 @06:10PM (#25461737)
There are indeed other ways to manage the fresh install process. Not sure they result in less critical vulnerabilities overall. It is all too easy to never update ancient versions of installations, especially as server maintenance is often handled by a separate team.
Re:51% of 4M Docker images have critical vulnerabilities by alisonkisk on Thursday December 17, 2020 @09:06AM (#25455653)
What does prod have to do with stale Docker images?

The problem is not updating your images. Running old libs on bare metal has exactly the same problem.

Re:51% of 4M Docker images have critical vulnerabilities by tannhaeuser on Thursday December 17, 2020 @09:39AM (#25455945)
> The problem is not updating your images. Running old libs on bare metal has exactly the same problem.

Updating libs on bare metal has maintainers and distributions, though. And doesn't force you to roll your own security infra within containers.

Re:51% of 4M Docker images have critical vulnerabilities by acdha on Thursday December 17, 2020 @09:53AM (#25456062)
You have all of that inside the container, too: apt-get upgrade doesn’t magically stop working because it’s in a Dockerfile. The difference is that you have a trivial way to confirm deployments and be confident that there isn’t other mutable state preventing an upgrade.
Re:51% of 4M Docker images have critical vulnerabilities by tannhaeuser on Thursday December 17, 2020 @10:04AM (#25456160)
If you base your container on Debian/Ubuntu, that is. And is at odds with the principle of only packing what's actually needed. If you base all your images on Debian/Ubuntu anyway, then what's the point of containers? If there's a vulnerability, you'd have to upgrade all of them anyway and they're living now as binary images on your build host instead of a versioned O/S.
Re:51% of 4M Docker images have critical vulnerabilities by acdha on Thursday December 17, 2020 @10:51AM (#25456623)
All containers give you a guaranteed build process and proof that mutable state is only stored in well-known locations. That’s a huge advantage over full servers right there as any experienced Unix admin will tell you.

If you’re using a container based on an OS, you are installing far, far less and having only one process running. That again is a huge savings: no time securing postfix and cron, etc.

Another big advantage is that you’re shifting this work from the deployment time to build time. You do it once and can test it as long as you want before deploying it to production - no more failures because Red Hat’s mirror is unavailable or malfunctioning during your prod update window.

Re:51% of 4M Docker images have critical vulnerabilities by Jonnax on Thursday December 17, 2020 @10:20AM (#25456313)
A container starts instantly and uses far fewer resources than a VM.

Even if you do a FROM Ubuntu or FROM Debian that's still a huge advantage.

Re:51% of 4M Docker images have critical vulnerabilities by seniorThrowaway on Thursday December 17, 2020 @10:23AM (#25456340)
A lot of this discussion seems to revolve around running java inside containers without explicitly saying so. Running the JVM brings along a whole host of dependencies which is typically resolved by running a full blown base OS image. It is still desirable by many teams due to past issues with maintaining the JVM on VM or metal hosts.
Re:51% of 4M Docker images have critical vulnerabilities by syshum on Thursday December 17, 2020 @09:29AM (#25455824)
Exactly, I know a few places that have years old installs of linux that never get updates... same thing.

nothing in docker prevents updates, just people in general are poor about doing maintenance, this is a story that is old as computers, and why MS forced updates on everyone because left to their own most people choose to "postpone" them indefinitely for fear of breaking things

Re:51% of 4M Docker images have critical vulnerabilities by Wowfunhappy on Thursday December 17, 2020 @09:42AM (#25455963)
> everyone because left to their own most people choose to "postpone" them indefinitely for fear of breaking things

It sure would be helpful if the updates didn't actually break things. It's usually not the security fixes that do that—stuff rarely breaks on LTSC, or in Debian point releases—it's all the other changes that get rolled in.

There's just too much churn across the industry. Even if the changes are good, too little thought is given to the cost of change itself.