Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8e298e8ad9f0
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0fb60e4e0f66
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jun 12, 2017

  1. Fix build

    edolstra committed Jun 12, 2017
    Copy the full SHA
    3414f38 View commit details
  2. Add 1.11.10 release notes

    edolstra committed Jun 12, 2017
    3
    Copy the full SHA
    0fb60e4 View commit details
Showing with 35 additions and 3 deletions.
  1. +1 −0 doc/manual/release-notes/release-notes.xml
  2. +31 −0 doc/manual/release-notes/rl-1.11.10.xml
  3. +3 −3 src/libstore/local-store.cc
1 change: 1 addition & 0 deletions doc/manual/release-notes/release-notes.xml
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
</partintro>
-->

<xi:include href="rl-1.11.10.xml" />
<xi:include href="rl-1.11.xml" />
<xi:include href="rl-1.10.xml" />
<xi:include href="rl-1.9.xml" />
31 changes: 31 additions & 0 deletions doc/manual/release-notes/rl-1.11.10.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="ssec-relnotes-1.11.10">

<title>Release 1.11.10 (2017-06-12)</title>

<para>This release fixes a security bug in Nix’s “build user” build
isolation mechanism. Previously, Nix builders had the ability to
create setuid binaries owned by a <literal>nixbld</literal>
user. Such a binary could then be used by an attacker to assume a
<literal>nixbld</literal> identity and interfere with subsequent
builds running under the same UID.</para>

<para>To prevent this issue, Nix now disallows builders to create
setuid and setgid binaries. On Linux, this is done using a seccomp BPF
filter. Note that this imposes a small performance penalty (e.g. 1%
when building GNU Hello). Using seccomp, we now also prevent the
creation of extended attributes and POSIX ACLs since these cannot be
represented in the NAR format and (in the case of POSIX ACLs) allow
bypassing regular Nix store permissions. On OS X, the restriction is
implemented using the existing sandbox mechanism, which now uses a
minimal “allow all except the creation of setuid/setgid binaries”
profile when regular sandboxing is disabled. On other platforms, the
“build user” mechanism is now disabled.</para>

<para>Thanks go to Linus Heckemann for discovering and reporting this
bug.</para>

</section>
6 changes: 3 additions & 3 deletions src/libstore/local-store.cc
Original file line number Diff line number Diff line change
@@ -585,16 +585,16 @@ static void canonicalisePathMetaData_(const Path & path, uid_t fromUid, InodesSe

if (eaSize < 0) {
if (errno != ENOTSUP)
throw SysError("querying extended attributes of ‘%s’", path);
throw SysError(format("querying extended attributes of ‘%s’") % path);
} else if (eaSize > 0) {
std::vector<char> eaBuf(eaSize);

if ((eaSize = llistxattr(path.c_str(), eaBuf.data(), eaBuf.size())) < 0)
throw SysError("querying extended attributes of ‘%s’", path);
throw SysError(format("querying extended attributes of ‘%s’") % path);

for (auto & eaName: tokenizeString<Strings>(std::string(eaBuf.data(), eaSize), std::string("\000", 1)))
if (lremovexattr(path.c_str(), eaName.c_str()) == -1)
throw SysError("removing extended attribute ‘%s’ from ‘%s’", eaName, path);
throw SysError(format("removing extended attribute ‘%s’ from ‘%s’") % eaName % path);
}
#endif