Earlier quoted context omitted.
Isn’t it a bit ironic with how much code everyone depends on that can freely be altered by some unknown party, while so much time goes into code reviews to verify internal changes at most companies.
you can have ten comments about the name of a variable, but no one bats an eye at a new npm package introduced. Also, devs that wrote code that Google depends on can't pass the leetcode gate check to get a job there. Our industry is a laughingstock.
Xz: Can you spot the single character that disabled Linux landlock?
261–270 of 322 posts
Re: Xz: Can you spot the single character that disabled Linux landlock?
#262Earlier quoted context omitted.
This has plausible deniability on it. There's better ways to hide by swapping in Unicode lookalike characters. Some of them even pixel match depending on the font. Maybe I'm out of the loop but is intentionality settled here?
the period right there on the left edge? if I saw that in a patch I'd be through the roof, that looks completely intentional
Re: Xz: Can you spot the single character that disabled Linux landlock?
#263Earlier quoted context omitted.
That's reasonably sane of SQL. In Slang, you don't need to quote. (The syntax is still unambiguous. In principle, eg Python could do something similar, because they don't have any existing syntax where you just put two identifiers next to each other with only a space in between. But C could not, because variable declaration is just two identifiers, one for the type and one for the variable name, next to each other wi…
In Slang, are “x y” with different number of spaces in the middle different identifiers or different spellings of the same identifier? SQL standard says different identifiers > eg Python could do something similar, because they don't have any existing syntax where you just put two identifiers next to each other with only a space in between The interaction with keywords would cause some issues. For example, right now,…
Sorry, I don't remember, and I can't seem to find it out online. I could ask my friends who still work there, if it's important. (For what it's worth, I never remember anyone complaining about mixing up a different number of spaces in their variable names. So either all number of spaces were treated the same, or perhaps multiple spaces in a row in an identifier were just banned (via linter or via language?).)
> The interaction with keywords would cause some issues. For example, right now, “if” is not a valid identifier (keyword), but “if_” and “_if” are. However, with this proposal “x y” could be a valid identifier, but “x if” would introduce ambiguity
Yes, you would need to sort out these details, if you wanted to add this 'feature' to Python.
> This is one aspect of C syntax I have never liked. I always wish it had been Pascal-style `x:int;` instead of `int x;`
I'm glad Rust made the same decision.
I do like using the 'space operator' to denote functions calls, at least for a language like Haskell or OCaml.
Re: Xz: Can you spot the single character that disabled Linux landlock?
#264Earlier quoted context omitted.
> Again, this is intended to be portable software. A scathing criticism of the OpenSSL library by the BSD team was that it was too portable in a (very real) sense that it wasn't even written in "C" any more, or targeting "libc" as the standard library. It would be more accurate to say that it was "Autotools/C" instead. By rewriting OpenSSL to target an actual full-featured libc, they found dozens of other bugs, inclu…
C basically has no standard library. It's no surprise to anyone who has ever used it more than in passing that you depend on the chosen build system to replace that. Building portable C libraries is very different because of this from any other commonly used programming language - even C++.
So it has one, but it's small. It has a few useful functions, for example system(const char*) which was used by the exploit.
Re: Xz: Can you spot the single character that disabled Linux landlock?
#265Earlier 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;
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.
Re: Xz: Can you spot the single character that disabled Linux landlock?
#266Earlier quoted context omitted.
Hey, leave C++ out of this. This is a C problem. https://en.cppreference.com/w/cpp/feature_test
That only works for language features though, it doesn't allow detecting OS/library features.
__has_include and other compile-time checking would work here (eg type_traits and enable_if)
Re: Xz: Can you spot the single character that disabled Linux landlock?
#267Earlier quoted context omitted.
The last sentence is an overreach to me, but I have experienced much of the same bike-shedding during code reviews. 95% of them are useless. Read that twice; I am not joking, sadly. I am not against code reviews, but in my experience(!), the reviewers are not incentivized to do a thorough job. Seriously, if you deliver a new feature vs do a deep, difficult code reviews, which one benefits you more? To repeat: I don't…
One 1 hour doing code review is not really stolen from doing feature work really is it? For the vast majority its stolen from playing video games or some other non-work.
Re: Xz: Can you spot the single character that disabled Linux landlock?
#268Earlier quoted context omitted.
I would actually say that he is completely wrong in this case. Open source created this problem.
And you think proprietary code doesn't have this problem? Can you prove it? Where's the evidence? ;)
Re: Xz: Can you spot the single character that disabled Linux landlock?
#269Earlier quoted context omitted.
Isn’t it a bit ironic with how much code everyone depends on that can freely be altered by some unknown party, while so much time goes into code reviews to verify internal changes at most companies.
>while so much time goes into code reviews to verify internal changes at most companies Maybe at FAANGs, but I work at a massive company and code review is non-existent.
Re: Xz: Can you spot the single character that disabled Linux landlock?
#270Earlier quoted context omitted.
I’m not sure this would be smaller scale? At least probably too early to tell?
I just mean fewer total packages and fewer maintainers. Linux libraries and packages don’t have the culture of making a package out of a single small function and importing it everywhere, which is part of the reason why NPM is a good case study in opportunities for supply chain attacks.