Live data from Hacker News

Alpine Linux Docker images have NULL for root password

cve.mitre.org

191–200 of 203 posts

Re: Alpine Linux Docker images have NULL for root password

#191
post #39

Earlier quoted context omitted.

For almost any serious job running in production, you might need CA certificates and openssl.

Unless you're behind a load balancer which terminates TLS and the traffic you deal with is purely http.

This has nothing to do with being a LB, if you need to do outgoing calls with https you most likely need ca-certificates.

Re: Alpine Linux Docker images have NULL for root password

#192
post #88

Earlier quoted context omitted.

Going through alpine:3.1 to alpine:3.9, then alpine:edge, I see that the following versions have the problem: 3.3, 3.4, 3.5, and 3.8.

3.8 looks fine? » docker run --rm -ti alpine:3.8 sh -c 'cat /etc/shadow | grep root' root:!::0::::: The others you mention though, I agree, they look less than fine. Also, has anyone reported this to the official Alpine repository? (since the Talos disclosure seems to be confused; it says official but has URLs to the Glider Labs version?) Edit: Ah, so here's the relevant GitHub issue for official Alpine Linux docker:…

You're right, they've patched 3.8; I was hitting an older cached image that I had laying around.

Re: Alpine Linux Docker images have NULL for root password

#193

Earlier quoted context omitted.

OK. In my experience it worked with any user account. I would install, create an account, and immediately use sudo to change the root password.

The first user account is considered an administrator account on most distros by default, so it has sudo privileges. If you can do what you said with a non-wheel/sudo account, that would be a serious vulnerability.

I see, thanks. I posted hoping people would inform me about this.

Re: Alpine Linux Docker images have NULL for root password

#194
post #32
post #19

Earlier quoted context omitted.

For anyone who want a small image but with glibc, https://github.com/GoogleContainerTools/distroless is a good choice, especially if you are writing in static linked language e.g. Go and Rust.

"distroless" is just Debian packages. Their self-description is fairly annoyingly misleading, since they don't mention that they are just using packages from Debian.

it should probably be called "package-manager-less" because there's no package manager in the final build, but there's also no ls, etc, so distroless kinda makes sense. Maybe systemless?

Re: Alpine Linux Docker images have NULL for root password

#195
post #175

Earlier quoted context omitted.

I trust myself who setup our infrastructure vs. the security guys who's automatic response to everything is deny all everywhere, encrypt everything everywhere (at rest encryption isn't enough, what can you do to get the db to work on the data encrypted internally 100% of the time?), and enable 2 factor on everything (the github gui has 2fa enabled, why aren't push/pull requests using 2fa?). I think may main point is…

Sounds like you need better security people.

Agreed.

Re: Alpine Linux Docker images have NULL for root password

#196

I have always been a bit surprised at the popularity of Alpine Linux for docker images. It’s awesome that the images are pretty small, but a wide variety of software has been shown to run noticeably slower on Alpine compared to other distributions, in part due to its usage of musl instead of glibc. I’d think that a few megabytes of disk isn’t as valuable as the extra cpu cycles.

>"It’s awesome that the images are pretty small, but a wide variety of software has been shown to run noticeably slower on Alpine compared to other distributions, in part due to its usage of musl instead of glibc" Might you have any citation(s) for this? I have not heard this before. Could you elaborate on what some the "wide variety of software" is? Thanks.

I've heard that having shared libraries like glibc allows for commonly shared hotpaths to remain in the CPU cache, making it faster. Whereas in musl, since the binaries all have their own copies of procedures, they are more often kicked out of cache. I don't imagine it has a big impact on a container where you are only running one or two binaries. Perhaps in a desktop environment with hundreds or thousands of different programs running, it might make a difference.

Re: Alpine Linux Docker images have NULL for root password

#197

Earlier quoted context omitted.

Adding a shell seems antithetical to deploying production code as a static-linked binary, not to mention an expansion of the attack surface of the container.

Without a shell, how does one debug if anything goes wrong?

You can start a container with a shell that shares the PID and network namespaces of the container you want to debug.

Re: Alpine Linux Docker images have NULL for root password

#198
post #113

Earlier quoted context omitted.

Which you probably shouldn't be doing for most of your services anyway.

I don't remember the last project I did which didn't have some sort of integration with an external service. I guess if you use microservices, most components won't need it; I mostly use monoliths.

I guess if everything is in a single service you're bound to have some sort of outbound connection at some point. Although, in my experience, you can go very far within your vpc.

Re: Alpine Linux Docker images have NULL for root password

#200
post #116

Earlier quoted context omitted.

remote debugging is a shell

not necessarily. e.g. java runtimes can expose debugging ports when needed that operate on a custom protocol. or you can just build gdb into the container and run the process under gdb, then attach to the tty. or you can debug from the host system where the container's pid namespace is a descendant of the root namespace and the other namespaces can be accessed via /proc or unshare.

What I meant is having a remote debugger is as good as having a remote shell in terms of remote code execution.
Post reply on HN