News for hackers. Stuff that matters.
Re:Debian on xz-utils: revert to version that does not conta... by armitron on Saturday March 30, 2024 @08:32AM (#39874215)
You're imagining things, there is no memory corruption mechanism. The payload is delivered into the process address space by dynamic linking through a shared dependency and hijacks a function via GNU_IFUNC.
Re:Debian on xz-utils: revert to version that does not conta... by nindalf on Saturday March 30, 2024 @08:37AM (#39874258)
Well, Rust doesn’t support dynamic linking. So this particular attack wouldn’t be possible with Rust in March 2024.

But it’s a moot point because there are undoubtedly other mechanisms a malicious maintainer could use to inject a vulnerability. Just not this exact one.

Re:Debian on xz-utils: revert to version that does not conta... by josephg on Saturday March 30, 2024 @08:47AM (#39874344)
Yes, But it would at least be harder. C has so many weird quirks and edge cases - including decades of legacy mechanisms (like IFUNC) that almost nobody today understands.

The underhanded C contest would be a lot less entertaining in rust. Thats a good thing.

It wouldn't solve the underlying problem permanently. But I don't think there's any slam-dunk solution here. I'll take any small wins where we can get them.

Re:Debian on xz-utils: revert to version that does not conta... by steveklabnik on Saturday March 30, 2024 @12:21PM (#39876251)
There was an Underhanded Rust contest many years ago https://news.ycombinator.com/item?id=15352253
Re:Debian on xz-utils: revert to version that does not conta... by dralley on Saturday March 30, 2024 @09:37AM (#39874747)
Rust does support dynamic linking, it's just not that useful because of the unstable ABI. You can dynamically link against C code, or Rust code presenting a C ABI, without issue, and you can dynamically link against Rust code if you accept the inherent limitations at the moment
Re:Debian on xz-utils: revert to version that does not conta... by jppittma on Saturday March 30, 2024 @08:59AM (#39874441)
As far as I can tell, Rust _does_ support dynamic linking. You can both compile rust code to .so and link against existing shared objects. What are you talking about?

>The compiler supports various methods to link crates together both statically and dynamically. This section will explore the various methods to link crates together, and more information about native libraries can be found in the FFI section of the book.

https://doc.rust-lang.org/reference/linkage.html

Re:Debian on xz-utils: revert to version that does not conta... by nindalf on Saturday March 30, 2024 @09:51AM (#39874881)
> What are you talking about?

I’m talking about what happens in practice, which is shipping static binaries that contain all of their dependencies, except for libc.

Re:Debian on xz-utils: revert to version that does not conta... by ReflectedImage on Saturday March 30, 2024 @08:43AM (#39874325)
Well Valgrind originally went off on it and oss-fuzz presumably would have caught it since here's a PR from the attacker asking for it to be disabled: https://github.com/google/oss-fuzz/pull/10667