<feed xmlns='http://www.w3.org/2005/Atom'>
<title>procd/initd, branch master</title>
<subtitle>OpenWrt service / process manager</subtitle>
<id>https://git.openwrt.org/project/procd/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/procd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/'/>
<updated>2024-11-13T21:48:05Z</updated>
<entry>
<title>initd: mount /sys and /proc with MS_RELATIME</title>
<updated>2024-11-13T21:48:05Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2024-11-13T21:22:48Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=7330fa55c5211eb7b3c675d1c7b8281b69b53553'/>
<id>urn:sha1:7330fa55c5211eb7b3c675d1c7b8281b69b53553</id>
<content type='text'>
Despite access timestamps not being needed on /sys and /proc, using
MS_NOATIME leads to many container tools not working because the new
mounts of /proc or /sys are more revealing than the original ones.
This results in not being able to mount /proc inside a user namespace
with procd's uxc, but also other tools like bubblewrap, podman or lxd.
Fix this by setting MS_RELATIME instead.

The problem has been present in procd since commit 9fcc900 ("fix up the
mount options to match what openwrt had before using procd as pid 1") but
also in pre-procd OpenWrt releases.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>init: attempt to mount efivarfs</title>
<updated>2023-01-16T21:07:54Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2023-01-13T23:17:06Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=190f13a75e67e0bdb662188da79b8be31e0aae01'/>
<id>urn:sha1:190f13a75e67e0bdb662188da79b8be31e0aae01</id>
<content type='text'>
Mount efivarfs to /sys/firmware/efi/efivars if available.

Tested-by: Oskari Rauta &lt;oskari.rauta@gmail.com&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>init: only relabel rootfs if started from initramfs</title>
<updated>2022-06-01T19:40:23Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2022-05-31T16:14:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=7a0096853594874d4c60266ec338ac23728017df'/>
<id>urn:sha1:7a0096853594874d4c60266ec338ac23728017df</id>
<content type='text'>
Do not relabel all the filesystem if not running from initramfs, it
should only be needed in this case.
Read-write (ext4) labels should be set when generating the filesystem
just like it's done for squashfs.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>init: selinux: don't relabel virtual filesystems</title>
<updated>2022-06-01T19:40:23Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2022-05-07T12:15:30Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=557c98e2966e0298a301f540824e2c3fce2452e6'/>
<id>urn:sha1:557c98e2966e0298a301f540824e2c3fce2452e6</id>
<content type='text'>
Attempting to relabel /dev/console, /proc or /sys results in an error
message. Avoid that by excluding them when relabeling rootfs on boot.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>init: restore SELinux labels after policy is loaded</title>
<updated>2022-05-03T01:05:16Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2022-05-03T00:12:04Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=652e6df06f8413f19a4786a275862cfe76628093'/>
<id>urn:sha1:652e6df06f8413f19a4786a275862cfe76628093</id>
<content type='text'>
Introduce an additional SELinux init step to calling restorecon to
label the filesystem. This fixes SELinux on initramfs or systems
with ext4 or ubifs read-write root filesystem.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>procd: completely remove tmp-on-zram support</title>
<updated>2022-03-03T20:25:56Z</updated>
<author>
<name>Rui Salvaterra</name>
</author>
<published>2020-06-29T10:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=6343c3a8b967abd23c9f858341a5d46afab0f36a'/>
<id>urn:sha1:6343c3a8b967abd23c9f858341a5d46afab0f36a</id>
<content type='text'>
The configuration settings were removed from the package, this is now dead code.

Signed-off-by: Rui Salvaterra &lt;rsalvaterra@gmail.com&gt;
</content>
</entry>
<entry>
<title>procd: clean up /dev/pts mounts</title>
<updated>2022-01-11T16:23:25Z</updated>
<author>
<name>Rui Salvaterra</name>
</author>
<published>2022-01-09T23:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=ac2b8b365bdbcbf292f77409d180ec3c0963faf3'/>
<id>urn:sha1:ac2b8b365bdbcbf292f77409d180ec3c0963faf3</id>
<content type='text'>
The default mode is already 600, no need to specify it. Access times are also
irrelevant.

Signed-off-by: Rui Salvaterra &lt;rsalvaterra@gmail.com&gt;
</content>
</entry>
<entry>
<title>procd: mount /dev with noexec</title>
<updated>2022-01-11T16:23:05Z</updated>
<author>
<name>Rui Salvaterra</name>
</author>
<published>2022-01-09T23:27:27Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=3b3ac648f48dda5269852994d42c70f61e9db4fe'/>
<id>urn:sha1:3b3ac648f48dda5269852994d42c70f61e9db4fe</id>
<content type='text'>
/dev is writable. Allowing execution inside it makes it a possible attack
vector. Kees Cook recently sent a kernel patch [1] in order to mount /dev as
noexec and nosuid for systems which rely on CONFIG_DEVTMPFS_MOUNT=y to
create/populate /dev, which isn't our case (it's procd's responsibility).

Add noexec to the /dev mount flags, since we already use nosuid (and keep the
coldplug flags symmetric, while at it). This carries the risk of breaking very
old, pre-KMS graphics drivers [2], but it shouldn't be a problem for systems
built in the last ~15 years. The vast majority of our targets doesn't have a
GPU, anyway. :)

[1] https://lore.kernel.org/all/YcMfDOyrg647RCmd@debian-BULLSEYE-live-builder-AMD64/
[2] https://lore.kernel.org/all/CAPXgP12e5LpN6XVxaXOHhH=u8XXN==2reTaJDCoCk4tP4QduDQ@mail.gmail.com/

Signed-off-by: Rui Salvaterra &lt;rsalvaterra@gmail.com&gt;
</content>
</entry>
<entry>
<title>initd: fix off-by-one error in mkdev.c</title>
<updated>2021-08-31T11:24:14Z</updated>
<author>
<name>Nick Hainke</name>
</author>
<published>2021-08-31T09:09:19Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=773e8da41532b23888511cd864fbd251ecadc577'/>
<id>urn:sha1:773e8da41532b23888511cd864fbd251ecadc577</id>
<content type='text'>
Substract 1 from bufsize so len can not be out of bounds. Same
hanling as in "udevtrigger.c" in "sysfs_resolve_link".

Replaces: 8eb1d783
Coverity CID: 1330087 Readlink used insecurely

Signed-off-by: Nick Hainke &lt;vincent@systemli.org&gt;
</content>
</entry>
<entry>
<title>Revert "initd: fix off-by-one error in mkdev.c"</title>
<updated>2021-08-31T11:24:14Z</updated>
<author>
<name>Nick Hainke</name>
</author>
<published>2021-08-31T09:09:18Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=20adf538b33c9b38b7ca3951f3c2ff4192e57660'/>
<id>urn:sha1:20adf538b33c9b38b7ca3951f3c2ff4192e57660</id>
<content type='text'>
This reverts commit 8eb1d783cca6e0d501dd3a2f94262ffc36ae6482.

This line reads a symbolic link into the string buffer "buf".
	len = readlink(buf2, buf, sizeof(buf));
The commit replaced now
	buf[len] = 0;
with
	buf[sizeof(buf) - 1] = '\0';

However, that does not work since readlink does not null-terminate
the string written into "buf" and  "buf[len] = 0" was used for that.

What happens if the buffer is to small?
"If the buf argument is not large enough to contain the link content,
the first bufsize bytes shall be placed in buf."
(Source: https://pubs.opengroup.org/onlinepubs/009695399/functions/readlink.htm)

Signed-off-by: Nick Hainke &lt;vincent@systemli.org&gt;
</content>
</entry>
</feed>
