Earlier quoted context omitted.
This is a huge pain when packaging things. You set up the package, add dependencies until it builds and think you are done. But they feature X is missing. What? Oh, it was silently disabled because libY isn't available. Ok, go back and add it. Then a user reports that feature Z isn't available... Yeah, just have a default set of features and allow `--enable-a --disable-b` as needed. The fact that it silently swallows…
Worse, it enables features based on local system packages whose dependencies aren’t captured by the package dependencies. At least for a time, this was a horrible problem in Yocto.
Xz: Can you spot the single character that disabled Linux landlock?
311–320 of 322 posts
Re: Xz: Can you spot the single character that disabled Linux landlock?
#312Earlier quoted context omitted.
That's ... how autoconf works? If you explicitly set the enable-landlock flag, configure will fail when the feature doesn't compile.
A cmake option only has two values: ON or OFF. There is no unset. Because it is a boolean. See: https://cmake.org/cmake/help/latest/command/option.html
Re: Xz: Can you spot the single character that disabled Linux landlock?
#313Earlier quoted context omitted.
Even more evil would have been to replace this line (void)SYS_landlock_create_ruleset; with this: (void)SYS_landloсk_create_ruleset;
Another point where I appreciate the Rust compiler: warning: the usage of Script Group `Cyrillic` in this crate consists solely of mixed script confusables --> src/lib.rs:1:4 | 1 | fn SYS_landloсk_create_ruleset() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: the usage includes 'с' (U+0441) = note: please recheck to make sure their usages are indeed what you want = note: `#[warn(mixed_script_confusables)]` on by default…
From what I understand, this landlock disabling wasn't relevant to the sshd attack. It appears it was setting up for something else.
Re: Xz: Can you spot the single character that disabled Linux landlock?
#314Earlier quoted context omitted.
Worse, it enables features based on local system packages whose dependencies aren’t captured by the package dependencies. At least for a time, this was a horrible problem in Yocto.
I think most distributions use some sort of build sandboxing at this point to avoid this problem and increase reproducibility in general right?
Re: Xz: Can you spot the single character that disabled Linux landlock?
#315Earlier quoted context omitted.
With the . the author can claim it was unintentional. It's impossible (or at least very hard) to claim the Cyrillic c is unintentional. To me, that makes the . more evil.
Plausible deniability
Re: Xz: Can you spot the single character that disabled Linux landlock?
#316Earlier quoted context omitted.
Probably the code review tools should be hardened as well, to indicate if extended identifiers had been introduced to a line where there wasn't any. That would help catching the replacement of a 'c' character with a Russian one. Btw, the -fno-extended-identifiers compiler parameter gives an error if UTF-8 identifiers are used in the code: :3:11: error: stray '\317' in program float = 0.5f;
> Probably the code review tools should be hardened as well, to indicate if extended identifiers had been introduced to a line where there wasn't any. Maybe in the future more languages/ tools will have the concept of per-project character sets, as opposed to trying to wrangle all possible Unicode ambiguity problems. I suppose then the problem is how to permit exceptions when integrating with some library written in…
Re: Xz: Can you spot the single character that disabled Linux landlock?
#317Earlier quoted context omitted.
Is there a GCC option to error on non-standard English characters?
The -fno-extended-identifiers option seems to do something in this area, but I don't know if it is sufficient. But it may block some characters which are used in standard English (for some values of standard).
So what? Source code was fine with ASCII for a long time, this push for unicode symbols is a recent endeavor and IMO a huge mistake not just because of the security impliciations.
Re: Xz: Can you spot the single character that disabled Linux landlock?
#318Re: Xz: Can you spot the single character that disabled Linux landlock?
#319Earlier quoted context omitted.
I think main issue was that it was embedded in the file itself like that. Would have preferred to have it in a separate valid C file with syntax highlighting etc and being parsed from that file.
Perhaps, but given how most build systems work, that would complicate things in other ways (since build systems often try to compile all .c files).
Re: Xz: Can you spot the single character that disabled Linux landlock?
#320Earlier quoted context omitted.
Shouldn't there be a unit test to confirm landlock is on/off? (I mean, this seems a crucial aspect of the code which needs 100% test coverage.)
This is not something that a unit test can catch. First, this 100% coverage rule applies to the program/library code, and only to the subset that is not ifdeffed out (otherwise, you will not be able to have, e.g., Windows-specific code), and definitely not to the build system's code. Second, how would you test that landlock works, in a unit test, when this feature is optional and depends on the system headers being r…