oss-sec mailing list archives

Re: Re: CVE request: Linux kernel silently ignores MS_RDONLY for bind mounts


From: Rich Felker <dalias () libc org>
Date: Sat, 28 Feb 2015 15:38:14 -0500

On Thu, Feb 26, 2015 at 02:58:17PM -0500, Daniel Micay wrote:
The commit adding this in 2.6.26 did actually document the weird
behaviour, so I guess it's just "by design". Users of the API like LXC,
Docker and systemd would likely have to iterate over /proc/self/mounts
and remount everything due to the way MS_REC works. Anyway, there's
clearly something wrong here when containers are claiming to have a
read-only mount feature but writes to the directory tree aren't prevented...

I'm wondering what the actual impact of this issue is supposed to be.
Why would any of the uids inside the container have write access to a
shared filesystem on which their uids are presumably not even
meaningful? It seems to me like this would only affect world-writable
files/directories on the shared filesystem, which sound like a bad
idea to begin with.

Rich


Current thread: