Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] data/gentoo-news:master commit in: 2021-07-07-systemd-tmpfiles/
Date: Fri, 09 Jul 2021 08:26:36
Message-Id: 1625819155.29519425838e9b67c6802e321ce52c76a65c2215.gyakovlev@gentoo
1 commit: 29519425838e9b67c6802e321ce52c76a65c2215
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 9 02:36:20 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 9 08:25:55 2021 +0000
6 URL: https://gitweb.gentoo.org/data/gentoo-news.git/commit/?id=29519425
7
8 2021-07-07-systemd-tmpfiles: add news item
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 .../2021-07-07-systemd-tmpfiles.en.txt | 66 ++++++++++++++++++++++
14 1 file changed, 66 insertions(+)
15
16 diff --git a/2021-07-07-systemd-tmpfiles/2021-07-07-systemd-tmpfiles.en.txt b/2021-07-07-systemd-tmpfiles/2021-07-07-systemd-tmpfiles.en.txt
17 new file mode 100644
18 index 0000000..159f95f
19 --- /dev/null
20 +++ b/2021-07-07-systemd-tmpfiles/2021-07-07-systemd-tmpfiles.en.txt
21 @@ -0,0 +1,66 @@
22 +Title: systemd-tmpfiles replaces opentmpfiles due to security issues
23 +Author: Georgy Yakovlev <gyakovlev@g.o>
24 +Author: Sam James <sam@g.o>
25 +Posted: 2021-07-07
26 +Revision: 1
27 +News-Item-Format: 2.0
28 +Display-If-Installed: sys-apps/opentmpfiles
29 +Display-If-Installed: sys-apps/systemd-tmpfiles
30 +
31 +A tmpfiles [0] implementation provides a generic mechanism to define
32 +the creation of regular files, directories, pipes, and device nodes,
33 +adjustments to their access mode, ownership, attributes, quota
34 +assignments, and contents, and finally their time-based removal.
35 +It is commonly used for volatile and temporary files and directories
36 +such as those located under /run/, /tmp/, /var/tmp/, the API file
37 +systems such as /sys/ or /proc/, as well as some other directories
38 +below /var/. [1]
39 +
40 +On 2021-07-06, the sys-apps/opentmpfiles package was masked due to a
41 +root privilege escalation vulnerability (CVE-2017-18925 [2],
42 +bug #751415 [3], issue 4 [4] upstream).
43 +
44 +The use of opentmpfiles is discouraged by its maintainer due to the
45 +unpatched vulnerability and other long-standing bugs [5].
46 +
47 +Users will start seeing their package manager trying to replace
48 +sys-apps/opentmpfiles with sys-apps/systemd-tmpfiles because it is
49 +another provider of virtual/tmpfiles.
50 +
51 +Despite the name, 'systemd-tmpfiles' does not depend on systemd, does
52 +not use dbus, and is just a drop-in replacement for opentmpfiles. It is
53 +a small binary built from systemd source code, but works separately,
54 +similarly to eudev or elogind. It is known to work on both glibc and
55 +musl systems.
56 +
57 +Note that systemd-tmpfiles is specifically for non-systemd systems. It
58 +is intended to be used on an OpenRC system.
59 +
60 +If you wish to selectively test systemd-tmpfiles, follow those steps:
61 +
62 + 1. # emerge --oneshot sys-apps/systemd-tmpfiles
63 + 2. # reboot
64 + 3. # rm /etc/runlevels/boot/opentmpfiles-setup
65 + 4. # rm /etc/runlevels/sysinit/opentmpfiles-dev
66 +
67 +No other steps required.
68 +
69 +If, after reviewing the linked bug reference for opentmpfiles, you feel
70 +your system is not vulnerable/applicable to the attack described, you
71 +can unmask [6] opentmpfiles at your own risk:
72 +
73 + 1. In /etc/portage/package.unmask, add a line:
74 + -sys-apps/opentmpfiles-
75 + 2. # emerge --oneshot sys-apps/opentmpfiles
76 +
77 +Note that opentmpfiles is likely to be removed from gentoo repository
78 +in the future.
79 +
80 +[0] https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html
81 +[1] https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
82 +[2] https://nvd.nist.gov/vuln/detail/CVE-2017-18925
83 +[3] https://bugs.gentoo.org/751415
84 +[4] https://github.com/OpenRC/opentmpfiles/issues/4
85 +[5] https://bugs.gentoo.org/741216
86 +[6] https://wiki.gentoo.org/wiki/Knowledge_Base:Unmasking_a_package
87 +