News for hackers. Stuff that matters.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by formerly_proven on Friday March 29, 2024 @01:48PM (#39866936)
I think this has been in the making for almost a year. The whole ifunc infrastructure was added in June 2023 by Hans Jansen and Jia Tan. The initial patch is "authored by" Lasse Collin in the git metadata, but the code actually came from Hans Jansen: https://github.com/tukaani-project/xz/commit/ee44863ae88e377...

> Thanks to Hans Jansen for the original patch.

https://github.com/tukaani-project/xz/pull/53

There were a ton of patches by these two subsequently because the ifunc code was breaking with all sorts of build options and obviously caused many problems with various sanitizers. Subsequently the configure script was modified multiple times to detect the use of sanitizers and abort the build unless either the sanitizer was disabled or the use of ifuncs was disabled. That would've masked the payload in many testing and debugging environments.

The hansjans162 Github account was created in 2023 and the only thing it did was add this code to liblzma. The same name later applied to do a NMU at Debian for the vulnerable version. Another "<name><number>" account (which only appears here, once) then pops up and asks for the vulnerable version to be imported: https://www.mail-archive.com/search?l=debian-bugs-dist@lists...

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by zb3 on Friday March 29, 2024 @01:58PM (#39867049)
Also I saw this hans jansen user pushing for merging the 5.6.1 update in debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067708
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by hxelk1 on Friday March 29, 2024 @05:29PM (#39869226)
From: krygorin4545 <[email protected]> To: "[email protected]" <[email protected]> Cc: "[email protected]" <[email protected]>, "[email protected]" <[email protected]> Subject: Re: RFS: xz-utils/5.6.1-0.1 [NMU] -- XZ-format compression utilities Date: Tue, 26 Mar 2024 19:27:47 +0000

Also seeing this bug. Extra valgrind output causes some failed tests for me. Looks like the new version will resolve it. Would like this new version so I can continue work.

--

Wow.

(Edited for clarity.)

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bed99 on Friday March 29, 2024 @04:02PM (#39868390)
1 week ago "Hans Jansen" user "hjansen" was created in debian and opened 8 PRs including the upgrade to 5.6.1 to xz-utils

From https://salsa.debian.org/users/hjansen/activity

Author: Hans Jansen <[email protected]>

- [Debian Games / empire](https://salsa.debian.org/games-team/empire): opened merge request "!2 New upstream version 1.17" - March 17, 2024

- [Debian Games / empire](https://salsa.debian.org/games-team/empire): opened merge request "!1 Update to upstream 1.17" - March 17, 2024

- [Debian Games / libretro / libretro-core-info](https://salsa.debian.org/games-team/libretro/libretro-core-i...): opened merge request "!2 New upstream version 1.17.0" - March 17, 2024

- [Debian Games / libretro / libretro-core-info](https://salsa.debian.org/games-team/libretro/libretro-core-i...): opened merge request "!1 Update to upstream 1.17.0" - March 17, 2024

- [Debian Games / endless-sky](https://salsa.debian.org/games-team/endless-sky): opened merge request "!6 Update upstream branch to 0.10.6" - March 17, 2024

- [Debian Games / endless-sky](https://salsa.debian.org/games-team/endless-sky): opened merge request "!5 Update to upstream 0.10.6" - March 17, 2024

- [Debian / Xz Utils](https://salsa.debian.org/debian/xz-utils): opened merge request "!1 Update to upstream 5.6.1" - March 17, 2024

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bombcar on Friday March 29, 2024 @04:27PM (#39868644)
That looks exactly like what you'd want to see to disguise the actual request you want, a number of pointless upstream updates in things that are mostly ignored, and then the one you want.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bed99 on Friday March 29, 2024 @05:46PM (#39869360)
agree
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by detistea on Saturday March 30, 2024 @03:43PM (#39877938)
glad I didn't merge it ...
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by bluecheese33 on Friday March 29, 2024 @02:06PM (#39867142)
> because the ifunc code was breaking with all sorts of build options and obviously caused many problems with various sanitizers

for example, https://github.com/google/oss-fuzz/pull/10667

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by zb3 on Friday March 29, 2024 @02:04PM (#39867127)
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by amluto on Friday March 29, 2024 @06:10PM (#39869538)
Wow, what a big pile of infrastructure for a non-optimization.

An internal call via ifunc is not magic — it’s just a call via the GOT or PLT, which boils down to function pointers. An internal call through a hidden visibility function pointer (the right way to do this) is also a function pointer.

The even better solution is a plain old if statement, which implements the very very fancy “devirtualization” optimization, and the result will be effectively predicted on most CPUs and is not subject to the whole pile of issue that retpolines are needed to work around.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by account42 on Wednesday April 03, 2024 @06:30AM (#39915610)
Right, IFUNCs make sense for library function where you have the function pointer indirection anyway. Makes much less sense for internal functions - only argument over a regular function pointer would be the pointer being marked RO after it is resolved (if the library was linked with -z relro -z now), but an if avoids even that issue.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by snvzz on Friday March 29, 2024 @11:46PM (#39871674)
>Hans Jansen and Jia Tan

Are they really two people conspiring?

Unless proven otherwise, it is safe to assume one is just a pseudonym alias of the other.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by EasyMark on Saturday March 30, 2024 @01:06AM (#39871990)
or possibly just one person acting as two, or a group of people?
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by cutemonster on Monday April 08, 2024 @12:10PM (#39971145)
Or a group managing many identities, backdooring many different projects
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by formerly_proven on Saturday March 30, 2024 @04:13AM (#39872872)
Make it two years.

Jia Tan getting maintainer access looks like it is almost certainly to be part of the operation. Lasse Colling mentioned multiple times how Jia has helped off-list and to me it seems like Jia befriended Lasse as well (see how Lasse talks about them in 2023).

Also the pattern of astroturfing dates back to 2022. See for example this thread where Jia, who has helped at this point for a few weeks, posts a patch, and a <name><number>@protonmail (jigarkumar17) user pops up and then bumps the thread three times(!) lamenting the slowness of the project and pushing for Jia to get commit access: https://www.mail-archive.com/[email protected]/msg00553.h...

Naturally, like in the other instances of this happening, this user only appears once on the internet.

Re:Backdoor in upstream xz/liblzma leading to SSH server com... by tootie on Saturday March 30, 2024 @10:03AM (#39875001)
Does anybody know anything about Jia Tan? Is it likely just a made up persona? Or is this a well-known person.
Re:Backdoor in upstream xz/liblzma leading to SSH server com... by SZJX on Monday April 01, 2024 @05:19PM (#39899479)
It’s certainly a pseudonym just like all the other personas we’ve seen popping up on the mailing list supporting this “Jia Tan” in these couple of years. For all intents and purposes they can be of any nationality until we know more.