Page 1 of 1

[not4n00bs] ...A Better "libc"

Posted: 14 Nov 2017, 23:37
by n0ctilucient
It's no secret I favor Musl over glibc because like
Google's Bionic it is immune to browser exploits
like Return-to-libc attack

see also... https://security.googleblog.com/2016/02 ... k.html?m=1

Although... I addressed this issue in an earlier,
thread (as "fullmoonremix") I have since found,
another way to enable musl libc as a glibc drop-in.

Renaming /usr/lib64/musl/ld-musl-x86_64.so.1
to ldd and copying it to /user/bin to overwrite the
original ldd is the initial way to deprecate glibc.

However... ld-musl-x86_64.so.1 is actually
a symlink to /usr/lib64/musl/libc.so.1

That means you can send libc.so.1 to a /root/Desktop
symlink rename it ldd and then copy it to /usr/bin to
overwrite the original ldd.

Please Note: One should (if possible) make remastered
module changes in /root/Desktop to avoid breaking
module symlinks.

It's been a while since I've reached out to src2pkg's
creator but since musl libc breaks src2pkg's "setup"
perhaps he knows a workaround.

Or maybe the solution lies in /usr/bin/musl-gcc?

More to come...

[not4n00bs] ...A Better "libc"

Posted: 19 Nov 2017, 16:53
by n0ctilucient
Ok... reached out to Gilbert (src2pkg).
The following is his solution...
export CC /usr/bin/musl-gcc ; src2pkg --setup

[not4n00bs] ...A Better "libc"

Posted: 30 Nov 2017, 01:31
by n0ctilucient
Updated my post.. An alternate script is to follow.

I also need to ask if this solution can be
added to /etc/src2pkg/src2pkg.conf... :%)
see... Src2pkg.conf w/ "hardened" EXTRA_FLAGS

If everything works out... there is a pathway to
a "hardened" Musl build of ALL binaries...

Hardened Gentoo and Alpine Linux use this strategy.

[not4n00bs] ...A Better "libc"

Posted: 26 Jan 2018, 16:44
by n0ctilucient
Update... very busy doing a rebuild.
But I do intend to reach out to Gilbert again.

Unfortunately... the situation
is... Musl still breaks src2pkg.

I am considering... Embedded GLIBC
as a possible workaround.

[not4n00bs] ...A Better "libc"

Posted: 16 Feb 2018, 11:53
by n0ctilucient
I can boot my system with Musl :celebrate3: but I CANNOT compile on it with src2pkg :wall: (@ least in my initial testing).

More to follow...

[not4n00bs] ...A Better "libc"

Posted: 16 Feb 2018, 12:22
by n0ctilucient
Update... trying to get Musl to play nice with Tiny C Compiler .