Hi Dave,
ok, understood.
Am 15.05.2018 um 17:56 schrieb David Godlove:
> Hi Oliver,
>
> I think the relevant line from above is:
>
>> Running Singularity in any way shape or form on systems without NO_NEW_PRIVS is not supported. Nobody is going to be testing older versions of the kernel for undiscovered vulnerabilities that might still affect Singularity.
>
> In other words we cannot ensure that the runtime checks are the relevant checks in this case. The runtime checks (which do also exist btw) are only in response to the vulnerabilities we have already discovered. Kernels without PR_NO_NEW_PRIVSare inherently insecure for many of the operations carried out by Singularity and those kernels are just not supported.
So in other words, you say if I build on a modern kernel (i.e. "passing the build time check") and then run on a system with an older kernel, checks may be nought?
So what's the build time check good for? Only those few others compiling on the same system they are executing on?
If building on a system which is more modern than the execute node is unsafe, this should certainly be documented!
> I don't think it is fair for you to attribute malicious intent to what you view as an incorrect packaging decision. But it is true that Sylabs doesn't have any distro maintainers on staff.
That's true, but you have people experienced with distro packaging, I believe. So it might be good to include them in such decisions.
> The way I see it, we are really supplying the files for rpm and deb packaging as a courtesy. You can look at them as a template for how you might write your own (if you really don't want to install from source for some reason),
Well, my reason is the one pointed out by your CEO in his mail from 04.04.2018 00:02, let's quote:
"My own personal note/comment.... Singularity is a system package, and should be installed into the operating system, not on a shared file system with modules. This is because typically that usage model is really good for when you have lots of different versions of applications installed and the user can pick which one they want. In general, you don't want to do this with any SETUID enabled codebase. RPM/DEB packages are your friend here, [...]"
I'm sorry, but I agree with him on this, for the SETUID enabled codebase at least (which is exactly what he says).
> but they shouldn't be used as is by distro maintainers. We've actually had some discussions about stripping those files down, making them very basic, and explicitly stating that they are templates provided as a courtesy and we are not accepting PRs on them. You've > no-doubt noticed that we don't have a lot of resources for reviewing and merging packaging-related PRs. It's not that we are uninterested in this, it just doesn't happen to be our main expertise and focus. And I think that is OK.
Let's continue the quote:
"[...] and if you need/want access to prebuilt, tested, and signed versions available via YUM, go here:
http://www.sylabs.io/singularity"
How will Sylabs provide these if packaging for distros is not your expertise?
But I agree, the packaging files in the Singularity repo are only out of courtesy, and that's fine.
Still, it's not nice that packaging is made harder by introducing a build-time check which only helps the few people running in the very same environment in which they build (which usually only developers do...).
It also means, taking your statement literally, that people with a more up-to-date build node than their execute nodes may be granted a false sense of security.
Cheers,
Oliver
>
> Dave
> Am 15.05.2018 um 17:13 schrieb David Godlove:
> > Hi Oliver,
> >
> > Please see my explanation to Lars above on why these checks matter at build time.
>
> which ones?
> The explanation I read only explained that you want to enforce people building singularity on older environments have to patch out the misplaced checks themselves.
> There was no explanation at all why the checks are done at build time instead of at the correct place, i.e. at post-install of the deb / rpm packages or at runtime.
>
> It seems there are common misconceptions about how packaging on Linux in general works amongst the Singularity devs.
> I hope that's discussed at some point in Sylabs, including @gmk, who (as one of the experienced persons from CentOS) should be able to point out to the others why build-time checks for run-time functionality
> are *not* done for any Linux package, and if they are for the rare exceptions where upstream devs do not understand the implications,
> are generally patched out at distro level.
>
> If Singularity want's to make packaging harder by violating established best practices, that's a statement on its own. Maybe the goal is not anymore to see widespread adoptiona and enter Debian / RedHat main repositories,
> but to rather sell off Singularity Pro packages?
>
> Cheers,
> Oliver
>
> >
> > Hi Igor,
> >
> > Just as I suspected, I am unable to replicate your issue. Don't really know what to say.
> >
> > vagrant@ubuntu-xenial:~$ cat /etc/os-release
> > NAME="Ubuntu"
> > VERSION="16.04.4 LTS (Xenial Xerus)"
> > ID=ubuntu
> > ID_LIKE=debian
> > PRETTY_NAME="Ubuntu 16.04.4 LTS"
> > VERSION_ID="16.04"
> > HOME_URL="
http://www.ubuntu.com/ <
http://www.ubuntu.com/>"
> > SUPPORT_URL="
http://help.ubuntu.com/ <
http://help.ubuntu.com/>"
> > BUG_REPORT_URL="
http://bugs.launchpad.net/ubuntu/ <
http://bugs.launchpad.net/ubuntu/>"
> > VERSION_CODENAME=xenial
> > UBUNTU_CODENAME=xenial
> >
> > vagrant@ubuntu-xenial:~$ uname -a
> > Linux ubuntu-xenial 4.4.0-124-generic #148-Ubuntu SMP Wed May 2 13:00:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
> >
> > vagrant@ubuntu-xenial:~$ curl -s
https://www.sylabs.io/privtest/no_new_privs.sh <
https://www.sylabs.io/privtest/no_new_privs.sh> | bash
> > Good news! This kernel supports the PR_SET_NO_NEW_PRIVS feature!
> >
> > On Tue, May 15, 2018 at 11:00 AM, Oliver Freyermuth <
o.frey...@googlemail.com <mailto:
o.frey...@googlemail.com> <mailto:
o.frey...@googlemail.com <mailto:
o.frey...@googlemail.com>>> wrote:
> >
> > Hi Dave,
> >
> > Lars is completely right.
> >
> > Checking for something at build time which matters at runtime is clearly a bug.
> > If you look around at Linux distros people are using, 99 % of the packages used in the world have *not* been compiled on the machine they are running on.
> > Hence, it's just the wrong approach checking in the build environment for something you want to ensure at runtime.
> >
> > We already went down this road earlier, if you remember:
> >
https://github.com/singularityware/singularity/issues/1044 <
https://github.com/singularityware/singularity/issues/1044> <
https://github.com/singularityware/singularity/issues/1044 <
https://github.com/singularityware/singularity/issues/1044>>
> >
> > For example, we build our RPMs and DEBs on the OpenBuildService. There's no reason the kernels there should match the kernels on the machines we deploy those DEBs / RPMs to.
> > If the official statement from Sylabs is, that nobody cares for packaging in RPMs and DEBs, that's of course a statement. Apparently, this is the case, since this kind of issues are repeated again and again.
> > It seems there are fundamental issues with how package deployment on Linux systems work in general.
> >
> > That's completely unrelated to the fact that of course everybody should update their build machines to modern kernels. I fully agree with that. But please don't implement checks at the wrong place just because it seems easier.
> > There is a correct place, and the rest of the world is using it. There's no need to reinvent the wheel once more and repeat mistakes which have been solved ages ago.
> >
> > Cheers,
> > Oliver
> >
> > Am 15.05.2018 um 16:27 schrieb David Godlove:
> > > Hi Lars,
> > >
> > > Here's my take on this.
> > >
> > > If you really want to override the tests and build Singularity on a system that does not implement the NO_NEW_PRIVS features you can always modify the code. It shouldn't be too hard to figure out where the tests are occurring and what steps must be taken to disable them. I think this is better than providing a built-in override option. Running Singularity in any way shape or form on systems without NO_NEW_PRIVS is not supported. Nobody is going to be testing older versions of the kernel for undiscovered vulnerabilities that might still affect Singularity. If an admin just absolutely cannot be bothered to upgrade their head/build node to support this feature than they must do what they feel is right. But by modifying the source code they are stating that they know what they are doing and they are happy to be on their own.
> > >
> > > Dave
> > >
> > > On Tue, May 15, 2018 at 9:30 AM, Lars Viklund <
zao...@gmail.com <mailto:
zao...@gmail.com> <mailto:
zao...@gmail.com <mailto:
zao...@gmail.com>> <mailto:
zao...@gmail.com <mailto:
zao...@gmail.com> <mailto:
zao...@gmail.com <mailto:
zao...@gmail.com>>>> wrote:
> > >
> > > Hi!
> > >
> > > I'm a bit surprised that there's a blocking test for kernel capabilities on the build host, shouldn't that be a runtime concern?
> > > I can't at find any override for these tests, which may be of use for people building on head/build nodes or preparing deb/RPM:s.
> > >
> > > // Lars
> > >
> > > On Tuesday, May 15, 2018 at 2:08:42 PM UTC+2, Dave Godlove wrote:
> > >
> > > Hi Igor,
> > >
> > > I'm surprised that you got that error with such a new kernel. The NO_NEW_PRIVS functions should be supported since Linux 3.5 and even earlier in RHEL and it's derivatives.
> > >
> > > I wonder if your kernel has been modified in some way? Here is a script <
https://www.sylabs.io/privtest/no_new_privs.sh <
https://www.sylabs.io/privtest/no_new_privs.sh> <
https://www.sylabs.io/privtest/no_new_privs.sh <
https://www.sylabs.io/privtest/no_new_privs.sh>>> you can use to check whether you kernel supports these features. To run it with ease you can issue the following command:
> > >
> > > curl -s
https://www.sylabs.io/privtest/no_new_privs.sh <
https://www.sylabs.io/privtest/no_new_privs.sh> <
https://www.sylabs.io/privtest/no_new_privs.sh <
https://www.sylabs.io/privtest/no_new_privs.sh>> <
https://www.sylabs.io/privtest/no_new_privs.sh <
https://www.sylabs.io/privtest/no_new_privs.sh> <
https://www.sylabs.io/privtest/no_new_privs.sh <
https://www.sylabs.io/privtest/no_new_privs.sh>>> | bash
> > > To unsubscribe from this group and stop receiving emails from it, send an email to
singularity...@lbl.gov <mailto:
singularity...@lbl.gov> <mailto:
singularity...@lbl.gov <mailto:
singularity...@lbl.gov>>.
> > >
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "singularity" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to
singularity...@lbl.gov <mailto:
singularity%2Bunsu...@lbl.gov> <mailto:
singularity%2Bunsu...@lbl.gov <mailto:
singularity%252Buns...@lbl.gov>> <mailto:
singularity...@lbl.gov <mailto:
singularity%2Bunsu...@lbl.gov> <mailto:
singularity%2Bunsu...@lbl.gov <mailto:
singularity%252Buns...@lbl.gov>>>.
> > >
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "singularity" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to
singularity...@lbl.gov <mailto:
singularity%2Bunsu...@lbl.gov> <mailto:
singularity%2Bunsu...@lbl.gov <mailto:
singularity%252Buns...@lbl.gov>> <mailto:
singularity...@lbl.gov <mailto:
singularity%2Bunsu...@lbl.gov> <mailto:
singularity%2Bunsu...@lbl.gov <mailto:
singularity%252Buns...@lbl.gov>>>.
> >
> >
> >
>
>