Live data from Hacker News

Xz: Can you spot the single character that disabled Linux landlock?

git.tukaani.org

161–170 of 322 posts

Re: Xz: Can you spot the single character that disabled Linux landlock?

#161
post #5

Earlier quoted context omitted.

The function is “check_c_source_compiles”. The comment indicates that the intention is to confirm that the Landlock functionality can be compiled on the system, in which case it will be enabled. The stray dot isn’t valid C, so it will never compile. By ensuring it can never compile, Landlock will never be enabled.

configure would print that it's not enabled, so it seems like the kind of thing people would eventually notice.

Maybe, eventually, but how many people read the reams of garbage autoconf spouts out until the feature they wanted fails to materialize?

Re: Xz: Can you spot the single character that disabled Linux landlock?

#162

Where/how was landlock supposed to be used? I guess you cannot really use it in a generic library like compression/decompression. The library has no clue what the program is supposed to do and what should be restricted. For a program it might be clearer. The sshd attack was using liblzma as a library. So disabling landlock seems unrelated? A sign that there is more bad code waiting to be detected / had been planned t…

Presumably sshd itself used to lock down its own capabilities after a certain point of execution. Removing the landlock means the daemon doesn’t lock itself down and will allow for better payload execution when they get to the exploitation stage. I don’t think these two things are unrelated. I think they already had payloads in mind and realized this would be a hurdle.

[deleted]

Re: Xz: Can you spot the single character that disabled Linux landlock?

#163
post #91

Earlier quoted context omitted.

“The thing that controls scope is the count of certain nonprinting characters, which happen to come in multiple widths” is reasonably insane, yes

Which non-printing characters are you talking about? Whitespace characters are very much printable. Yes, I agree that Python should just forbid tabs. As a second best, you can tell your linter (and/or formatter) to forbid tabs (and any weird unicode whitespace). That's basically the equivalent of compiling your C with -Wall.

This was an issue in Python 2, where for some dumb reason it allowed mixing tabs and spaces and equated tab to 8 spaces (I think). Python 3 doesn't have that issue.

Re: Xz: Can you spot the single character that disabled Linux landlock?

#164

Earlier quoted context omitted.

Does autotools compile only, or try to link? There's no main().

There is a main()...[0] [0] https://git.tukaani.org/?p=xz.git;a=blob;f=CMakeLists.txt;h=...

That's not autotools.

Re: Xz: Can you spot the single character that disabled Linux landlock?

#165

Earlier quoted context omitted.

>How can we ensure say, that Microsoft doesn't pay someone to throw a wrench in libre office development or Adobe to sabotage Gimp? Microsoft and Adobe have reputations to uphold long into the future. Is that infallible? Hell no it isn't, but consider that Jia Tan only needed to uphold his reputation insofar as getting his backdoor onto everyone's systems. Once that is done, his reputation or the lack thereof becomes…

Those companies are famous for skullduggery. They can secure the dominance of their offering against the open source competition for well under 500k a year. It's a no brainer. What this might look like would be say, poorly discernable icons, clumsy UI design, or an unstable API that makes plugins constantly break. Large volumes of documentation that are inadequate or inaccurate in critical places, etc. If I was malic…

Well since you seemingly want to paint Microsoft and other such companies in a bad light, let me point out to you that it's actually Microsoft who brought awareness to this very problem: Andres Freund works at Microsoft.[1][2]

It is probably prudent for you (and other like-minded individuals) to be more careful who you think your enemies really are. Infighting against friends and allies, or even neutral parties, is exactly what your real enemies would want you to do.

[1]: https://www.linkedin.com/in/andres-freund

[2]: https://twitter.com/AndresFreundTec

Re: Xz: Can you spot the single character that disabled Linux landlock?

#166

Only in CMake, this time. Not in the autotools version.

Does autotools compile only, or try to link? There's no main().

AC_COMPILE_IFELSE indeed only compiles, so there's no need for main().

There's AC_LINK_IFELSE if you want to test linking too.

Re: Xz: Can you spot the single character that disabled Linux landlock?

#167

Geez, his last commit is making security reports worse: https://git.tukaani.org/?p=xz.git;a=commitdiff;h=af071ef7702...

Why is that accepted? Serious question

Presumably because they're one of the two maintainers: https://web.archive.org/web/20240329182607/https://xz.tukaan...

Re: Xz: Can you spot the single character that disabled Linux landlock?

#168

Earlier quoted context omitted.

Truly seems that way currently. He said he'd really dig in starting next week and just checked his email on vacation and saw this whole mess.

It may be hard for him to re-establish trust. Maintaining xz for more than a decade then doing this would be quite a "long con" but if HN threads are any indication, many will still be suspicious. His commits on these links look legit to me. It's a sad situation for him if he wasn't involved.

The fact GitHub suspended his account too suggests that they might have info saying he is involved.

Re: Xz: Can you spot the single character that disabled Linux landlock?

#169

Where/how was landlock supposed to be used? I guess you cannot really use it in a generic library like compression/decompression. The library has no clue what the program is supposed to do and what should be restricted. For a program it might be clearer. The sshd attack was using liblzma as a library. So disabling landlock seems unrelated? A sign that there is more bad code waiting to be detected / had been planned t…

Presumably sshd itself used to lock down its own capabilities after a certain point of execution. Removing the landlock means the daemon doesn’t lock itself down and will allow for better payload execution when they get to the exploitation stage. I don’t think these two things are unrelated. I think they already had payloads in mind and realized this would be a hurdle.

No. OpenSSH doesn't use Landlock, and even if it did, this patch wouldn't affect it.

Re: Xz: Can you spot the single character that disabled Linux landlock?

#170

Earlier quoted context omitted.

Is there a GCC option to error on non-standard English characters?

Error-ing is the point here and what the period achieved. It’s a feature detection snippet so if it fails to compile the feature is disabled.

It seems like there should be a way to catch these types of “bugs” - some form of dynamic analysis tool that extracts the feature detection code snippets and tries to compile them; if they fail for something like a syntax error, flag it as a broken check.

Expanding macros on different OSes could complicate things though, and determining what flags to build the feature check code with — so perhaps filtering based on the type of error would be best done as part of the build system functionality for doing the feature checking.

Post reply on HN