please remove prelink from focal

Bug #1847611 reported by Paul
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
prelink (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Hi !

Just installed prelink on a fresh Eoan beta install following this process and got an instant "core dumpled" error :

sudo apt install prelink
sudo sed -i 's/PRELINKING=unknown/PRELINKING=yes/' /etc/default/prelink
sudo /etc/cron.daily/prelink

Had to boot on a live usb,
mount my / in /mnt
and "sudo cp -r /lib/x86_64-linux-gnu /mnt/lib/" to get rid ot this error.

And then did this to remove prelink :
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
apt purge prelink

Is prelink deprecated or is it an error ? (and is it still useful BTW ?)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in prelink (Ubuntu):
status: New → Confirmed
Revision history for this message
yitzhaq (yitzhaq) wrote :

This verkakte thing. It seems having this package installed and enabled will break any eoan install. At least it broke all of mine, but in a way that's caused great fun for the better part of a week now.

So, say you have prelink already installed. It's been there for years, never caused trouble, you forget it's even there. You then upgrade disco to eoan. Upgrade process seems to have gone quite smoothly - great. Getting on with your day.
Truth is you have a ticking time bomb.

Within 24h, cron.daily will have invoked prelinking of your new lib versions. This will cause ~every useful binary on your system to segfault for no immediately obvious reason. Syslog will tell you things like this, which if you know the culprit is prelink makes total sense, but if not adds to the mayhem:

Nov 7 01:11:14 plopp kernel: [ 379.248086] ldd[5762]: segfault at 0 ip 00007f2adace11f6 sp 00007ffecdb69978 error 6 in libc-2.30.so[7f2adace1000+178000]
Nov 7 01:11:14 plopp kernel: [ 379.248094] Code: fe ff ff 90 f3 0f 1e fa 68 19 00 00 00 f2 e9 21 fe ff ff 90 f3 0f 1e fa 68 18 00 00 00 f2 e9 11 fe ff ff 90 f3 0f 1e fa 68 05 <00> 00 00 f2 e9 01 fe ff ff 90 f3 0f 1e fa 68 17 00 00 00 f2 e9 f1
Nov 7 01:11:14 plopp kernel: [ 379.248421] awk[5763]: segfault at 0 ip 00007f957042b1f6 sp 00007ffc30077d58 error 6 in libc-2.30.so[7f957042b000+178000]
Nov 7 01:11:14 plopp kernel: [ 379.248428] Code: fe ff ff 90 f3 0f 1e fa 68 19 00 00 00 f2 e9 21 fe ff ff 90 f3 0f 1e fa 68 18 00 00 00 f2 e9 11 fe ff ff 90 f3 0f 1e fa 68 05 <00> 00 00 f2 e9 01 fe ff ff 90 f3 0f 1e fa 68 17 00 00 00 f2 e9 f1
Nov 7 01:11:14 plopp kernel: [ 379.252793] apport[5764]: segfault at 0 ip 000000323b007506 sp 00007ffe79f16ee8 error 6 in libpthread-2.30.so[323b007000+11000]
Nov 7 01:11:14 plopp kernel: [ 379.252801] Code: fb ff ff 90 f3 0f 1e fa 68 4b 00 00 00 f2 e9 31 fb ff ff 90 f3 0f 1e fa 68 4c 00 00 00 f2 e9 21 fb ff ff 90 f3 0f 1e fa 68 4d <00> 00 00 f2 e9 11 fb ff ff 90 f3 0f 1e fa 68 4e 00 00 00 f2 e9 01
Nov 7 01:11:14 plopp kernel: [ 379.252822] Process 5764(apport) has RLIMIT_CORE set to 1
Nov 7 01:11:14 plopp kernel: [ 379.252822] Aborting core

You go WTF, and figure a reboot seems the way to go here. Wrong, cause now your system won't boot anymore. With Plymouth, all you see is an apparent freeze. With recovery mode and console, you see a kernel panic.

As pointed out by OP, getting rid of prelink and its cache will sort out the issue. But before you can get to that point you have to make the connection, which might be immediate if you just installed the package, but far less obvious in the case of an upgrade.
And then, of course, start the recovery process of every affected install.

The prelink package ships defused, so it doesn't really do anything, but once you activate its one purpose you have effectively set a timer to brick your system. I'm not sufficiently familiar with the bug escalation process in Ubuntu, but this to me sounds like release critical material or similar.

Revision history for this message
Geoffrey Thomas (geofft) wrote :

As the Debian maintainer I filed a removal ticket https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921401 but there's one package using it (sl-modem, I think that's fixable by throwing -Wl,-execstack or something at it) that I haven't gotten around to chasing. If someone wants to apply Ubuntu-specific changes to deal with the problem (perhaps remove both packages? does anyone even use sl-modem these days?) that would be entirely reasonable, IMO.

I will try to make these changes in Debian and requestsync for Ubuntu's development branch at ... some point ... but I'm clearly bad at having time.

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Hello archive admins, I believe this is compelling case to remove prelink from Ubuntu before 20.04 LTS is released:

- prelink defeats ASLR runtime exploit mitigations
- prelink breaks debsums(1)-style accidental modification detection tools
- prelink also appears to break everything else in eoan

Thanks

summary: - Installing prelink on a fresh eoan install gets me a "Core dumped" error
+ please remove prelink from focal
Revision history for this message
Yves Lavoie (yves-lavoie-ing) wrote :

Obvious now, painful before. prelink should be added to oean installation prechecks and, at the very minimum, disabled by the installation process

Revision history for this message
Steve Langasek (vorlon) wrote :

prelink provides execstack, which is a build-dependency of the nvidia-graphics-drivers source packages. For removal of the prelink source package, this would require negotiation with the maintainer of the nvidia packages to drop that dependency.

The prelink binary package could be dropped by any Ubuntu uploader by changing the source package to only generate the execstack package and not the prelink package.

Changed in prelink (Ubuntu):
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.