Patching glibc 2.27 on Ubuntu

Evgeny Morozov evgeny+libclist@loop54.com
Thu Nov 25 08:53:25 GMT 2021


Hi,

I'd like to apply a patch from
https://sourceware.org/bugzilla/show_bug.cgi?id=25847 (the "mitigation
patch": https://sourceware.org/bugzilla/attachment.cgi?id=12484) to many
x64 systems running Ubuntu 18.04. They should all have the same version of
the libc6 package installed. Is it possible to build it on one system and
just copy the affected binaries to all of them, or do I have to build and
install it on each system? If I can copy just a few binaries, should I copy
only libpthread.so, libc.so, both, something else?

I was able to build glibc as follows:

sudo apt build-dep glibc
mkdir src
apt source glibc
mkdir build
cd build
../glibc-2.27/configure --prefix=/usr
make -j

This generates a 17MB libc.so file, while the system one is ~2MB. Should I
run strip on it?

Thanks in advance,
Evgeny Morozov


More information about the Libc-help mailing list