snapd remove /usr/local/bin from the PATH for all systemd unit (bionic SRU regression)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
New
|
Undecided
|
Unassigned | ||
Cosmic |
Won't Fix
|
Undecided
|
Unassigned | ||
snapd (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
Fix Released
|
Critical
|
Unassigned | ||
Cosmic |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Initramfs exports PATH to init, which is different than the expected stock / compiled one, which results in slightly different runtime behaviour of init, if it has environment generators as well.
[Test Case]
* Disable snapd env generator & disable initrd-less boot (if enabled)
sudo chmod -x /usr/lib/
set empty GRUB_FORCE_
* Reboot cosmic system with an initramfs
$ journalctl -b -k | grep initramfs
(verify that initramfs was unpacked)
* Check the path used by systemd, ie.:
systemd-run /usr/bin/env
journalctl -b -e | grep PATH
It should contain /usr/local
* Enable any env generator for example & reboot:
/usr/
#!/bin/sh
echo XNOX=ROCKS
* Verify path used by systemd
It should still contain /usr/local
Repeat again with the new initramfs-tools.
[Regression Potential]
* We are hardcoding, the same path, yet again, in one more place. However, we are setting it to a well-known value (see https:/
) as it is universally expected and regressed when booted (a) with initrd AND (b) with broken path exported by initrd AND (c) with an env-generator.
[Other Info]
* Anything else you think is useful to include
* Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
* and address these questions in advance
===
Big regression in 2.37.1+18.04 compare to version 2.34.2
all these paths /usr/local/sbin & /usr/local/bin are not anymore in the path of all systemd process .
So we can not start a daemon that use /usr/local/bin
reinstalling package 2.34.2 fix the problem
in 2.34.2 :
~# strings /proc/$(pidof /lib/systemd/
PATH=/usr/
in 2.37.1+18.04 :
~# strings /proc/$(pidof /lib/systemd/
PATH=/sbin:
tags: | added: regression-update |
Changed in snapd (Ubuntu): | |
importance: | Undecided → High |
summary: |
- snapd remove /usr/local/bin from the PATH for all systemd unit + snapd remove /usr/local/bin from the PATH for all systemd unit (bionic + SRU regression) |
description: | updated |
description: | updated |
Changed in snapd (Ubuntu Cosmic): | |
status: | New → Won't Fix |
Changed in initramfs-tools (Ubuntu Cosmic): | |
status: | New → Won't Fix |
Changed in systemd (Ubuntu Cosmic): | |
status: | New → Won't Fix |
Changed in snapd (Ubuntu): | |
status: | Confirmed → Fix Released |
no longer affects: | systemd (Ubuntu Cosmic) |
no longer affects: | systemd (Ubuntu Bionic) |
no longer affects: | systemd (Ubuntu) |
likely fallout of the fix from 1771858