| 15 Jul 2025 |
aloisw | In which case it is unclear how the additional directory layer helps. | 15:06:43 |
raitobezarius | jade_ fwiw, i think the email setup has ceased to function | 17:47:10 |
raitobezarius | i ceased receiving any emails including your reviews you performed on pennae's chain today | 17:47:18 |
raitobezarius | unfortunately too low energy to jump on the problem | 17:47:26 |
raitobezarius | cc emily if you do have some time to spare on this (no hurry ofc) | 17:47:36 |
emily | uh sure, can look into this if jade is currently away/afk | 17:51:26 |
raitobezarius | In reply to @aloisw:julia0815.de Thank you. Is my understanding correct that CVE-2025-52991 only applies once you already have the directory emptying (or otherwise deletion of the build directory)? CVE-2025-52991 is one of the primitive that is used in the attack chain, yes | 17:51:29 |
raitobezarius | it doesn't "apply" because it's not an attack by itself | 17:51:36 |
raitobezarius | (that CVE is a technical CVE to refer to the technical vulnerability of leaving leftovers in the Nix store) | 17:51:49 |
raitobezarius | without another primitive to chain it, it's useless | 17:52:01 |
raitobezarius | In reply to @aloisw:julia0815.de In which case it is unclear how the additional directory layer helps. additional directory layer prevent an attacker to recreate a deleted directory structure because the location is not world writeable anymore | 17:52:19 |
raitobezarius | ah oops, I was talking about 52992 | 17:52:41 |
raitobezarius | 52991 is about world readable and world writeable location | 17:52:48 |
raitobezarius | yeah if you have /tmp/SOMETHING/nix-build-xxxxxxxxx | 17:53:03 |
raitobezarius | if an attacker can destroys nix-build-xxxxxxxxx by abusing Nix | 17:53:15 |
raitobezarius | it cannot recreate nix-build-xxxxxxxxxx while putting Nix to sleep with something else | 17:53:23 |
raitobezarius | because SOMETHING is not world writeable | 17:53:29 |
raitobezarius | (i'm a bit sleepy so please let me know if I'm not making sense) | 17:53:52 |
aloisw | I understand, but if you have arbitrary directory empty you can just as well destroy and recreate /tmp/SOMETHING? | 17:53:55 |
raitobezarius | the _deletePath was arbitrary in the limits of nix-collect-garbage or nix-(build right | 17:54:38 |
raitobezarius | * the _deletePath was arbitrary in the limits of nix-collect-garbage or nix-build right | 17:54:42 |
raitobezarius | could you make it delete /tmp/SOMETHING | 17:54:47 |
raitobezarius | arguably if SOMETHING is not owned by nixbld | 17:56:00 |
raitobezarius | but by root:root | 17:56:03 |
raitobezarius | hm, _deletePath will still run in root context | 17:56:14 |
raitobezarius | I agree with your assessment | 17:56:18 |
aloisw | I think it deletes as root? | 17:56:26 |
raitobezarius | This protection is mostly hardening and is still lacking a final component: dropping the privilege of the nix daemon | 17:56:38 |
raitobezarius | If your deletion primitive is limited to Nix build artifacts, this is still effective | 17:56:55 |
raitobezarius | If your deletion primitive is absolutely unlimited and runs as root | 17:57:03 |