diff options
-rw-r--r-- | meta/recipes-core/systemd/systemd-boot_244.5.bb (renamed from meta/recipes-core/systemd/systemd-boot_244.3.bb) | 0 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd.inc | 2 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd/CVE-2020-13776.patch | 96 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd/systemd-udev-seclabel-options-crash-fix.patch | 30 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_244.5.bb (renamed from meta/recipes-core/systemd/systemd_244.3.bb) | 5 |
5 files changed, 4 insertions, 129 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_244.3.bb b/meta/recipes-core/systemd/systemd-boot_244.5.bb index f92c639810..f92c639810 100644 --- a/meta/recipes-core/systemd/systemd-boot_244.3.bb +++ b/meta/recipes-core/systemd/systemd-boot_244.5.bb | |||
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index e73b397b5d..3165d13f03 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc | |||
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1" | |||
14 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ | 14 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ |
15 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" | 15 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" |
16 | 16 | ||
17 | SRCREV = "b7ed902b2394f94e7f1fbe6c3194b5cd9a9429e6" | 17 | SRCREV = "3ceaa81c61b654ebf562464d142675bd4d57d7b6" |
18 | SRCBRANCH = "v244-stable" | 18 | SRCBRANCH = "v244-stable" |
19 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}" | 19 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}" |
20 | 20 | ||
diff --git a/meta/recipes-core/systemd/systemd/CVE-2020-13776.patch b/meta/recipes-core/systemd/systemd/CVE-2020-13776.patch deleted file mode 100644 index 7b5e3e7f7a..0000000000 --- a/meta/recipes-core/systemd/systemd/CVE-2020-13776.patch +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | From 156a5fd297b61bce31630d7a52c15614bf784843 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> | ||
3 | Date: Sun, 31 May 2020 18:21:09 +0200 | ||
4 | Subject: [PATCH 1/1] basic/user-util: always use base 10 for user/group | ||
5 | numbers | ||
6 | |||
7 | We would parse numbers with base prefixes as user identifiers. For example, | ||
8 | "0x2b3bfa0" would be interpreted as UID==45334432 and "01750" would be | ||
9 | interpreted as UID==1000. This parsing was used also in cases where either a | ||
10 | user/group name or number may be specified. This means that names like | ||
11 | 0x2b3bfa0 would be ambiguous: they are a valid user name according to our | ||
12 | documented relaxed rules, but they would also be parsed as numeric uids. | ||
13 | |||
14 | This behaviour is definitely not expected by users, since tools generally only | ||
15 | accept decimal numbers (e.g. id, getent passwd), while other tools only accept | ||
16 | user names and thus will interpret such strings as user names without even | ||
17 | attempting to convert them to numbers (su, ssh). So let's follow suit and only | ||
18 | accept numbers in decimal notation. Effectively this means that we will reject | ||
19 | such strings as a username/uid/groupname/gid where strict mode is used, and try | ||
20 | to look up a user/group with such a name in relaxed mode. | ||
21 | |||
22 | Since the function changed is fairly low-level and fairly widely used, this | ||
23 | affects multiple tools: loginctl show-user/enable-linger/disable-linger foo', | ||
24 | the third argument in sysusers.d, fourth and fifth arguments in tmpfiles.d, | ||
25 | etc. | ||
26 | |||
27 | Fixes #15985. | ||
28 | --- | ||
29 | src/basic/user-util.c | 2 +- | ||
30 | src/test/test-user-util.c | 10 ++++++++++ | ||
31 | 2 files changed, 11 insertions(+), 1 deletion(-) | ||
32 | |||
33 | --- end of commit 156a5fd297b61bce31630d7a52c15614bf784843 --- | ||
34 | |||
35 | |||
36 | Add definition of safe_atou32_full() from commit b934ac3d6e7dcad114776ef30ee9098693e7ab7e | ||
37 | |||
38 | CVE: CVE-2020-13776 | ||
39 | |||
40 | Upstream-Status: Backport [https://github.com/systemd/systemd.git] | ||
41 | |||
42 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
43 | |||
44 | |||
45 | |||
46 | --- git.orig/src/basic/user-util.c | ||
47 | +++ git/src/basic/user-util.c | ||
48 | @@ -49,7 +49,7 @@ int parse_uid(const char *s, uid_t *ret) | ||
49 | assert(s); | ||
50 | |||
51 | assert_cc(sizeof(uid_t) == sizeof(uint32_t)); | ||
52 | - r = safe_atou32(s, &uid); | ||
53 | + r = safe_atou32_full(s, 10, &uid); | ||
54 | if (r < 0) | ||
55 | return r; | ||
56 | |||
57 | --- git.orig/src/test/test-user-util.c | ||
58 | +++ git/src/test/test-user-util.c | ||
59 | @@ -48,9 +48,19 @@ static void test_parse_uid(void) { | ||
60 | |||
61 | r = parse_uid("65535", &uid); | ||
62 | assert_se(r == -ENXIO); | ||
63 | + assert_se(uid == 100); | ||
64 | + | ||
65 | + r = parse_uid("0x1234", &uid); | ||
66 | + assert_se(r == -EINVAL); | ||
67 | + assert_se(uid == 100); | ||
68 | + | ||
69 | + r = parse_uid("01234", &uid); | ||
70 | + assert_se(r == 0); | ||
71 | + assert_se(uid == 1234); | ||
72 | |||
73 | r = parse_uid("asdsdas", &uid); | ||
74 | assert_se(r == -EINVAL); | ||
75 | + assert_se(uid == 1234); | ||
76 | } | ||
77 | |||
78 | static void test_uid_ptr(void) { | ||
79 | --- git.orig/src/basic/parse-util.h | ||
80 | +++ git/src/basic/parse-util.h | ||
81 | @@ -45,9 +45,13 @@ static inline int safe_atoux16(const cha | ||
82 | |||
83 | int safe_atoi16(const char *s, int16_t *ret); | ||
84 | |||
85 | -static inline int safe_atou32(const char *s, uint32_t *ret_u) { | ||
86 | +static inline int safe_atou32_full(const char *s, unsigned base, uint32_t *ret_u) { | ||
87 | assert_cc(sizeof(uint32_t) == sizeof(unsigned)); | ||
88 | - return safe_atou(s, (unsigned*) ret_u); | ||
89 | + return safe_atou_full(s, base, (unsigned*) ret_u); | ||
90 | +} | ||
91 | + | ||
92 | +static inline int safe_atou32(const char *s, uint32_t *ret_u) { | ||
93 | + return safe_atou32_full(s, 0, (unsigned*) ret_u); | ||
94 | } | ||
95 | |||
96 | static inline int safe_atoi32(const char *s, int32_t *ret_i) { | ||
diff --git a/meta/recipes-core/systemd/systemd/systemd-udev-seclabel-options-crash-fix.patch b/meta/recipes-core/systemd/systemd/systemd-udev-seclabel-options-crash-fix.patch deleted file mode 100644 index 27b2b60fad..0000000000 --- a/meta/recipes-core/systemd/systemd/systemd-udev-seclabel-options-crash-fix.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 0335d110afc08baf47d76b7011ce02510dfdd524 Mon Sep 17 00:00:00 2001 | ||
2 | From: Valery0xff <valery.chernous@gmail.com> | ||
3 | Date: Wed, 11 Mar 2020 02:20:36 +0200 | ||
4 | Subject: [PATCH] udev: fix SECLABEL{selinux} issue (#15064) | ||
5 | |||
6 | Add SECLABEL{selinux}="some value" cause udevadm crash | ||
7 | systemd-udevd[x]: Worker [x] terminated by signal 11 (SEGV) | ||
8 | |||
9 | It happens since 25de7aa7b90 (Yu Watanabe 2019-04-25 01:21:11 +0200) | ||
10 | when udev rules processing changed to token model. Yu forgot store | ||
11 | attr to SECLABEL token so fix it. | ||
12 | --- | ||
13 | src/udev/udev-rules.c | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | Upstream-Status: Backport [https://github.com/systemd/systemd/commit/0335d110afc08baf47d76b7011ce02510dfdd524.patch] | ||
17 | --- | ||
18 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c | ||
19 | index b9b350d1ef..b990f68e93 100644 | ||
20 | --- a/src/udev/udev-rules.c | ||
21 | +++ b/src/udev/udev-rules.c | ||
22 | @@ -921,7 +921,7 @@ static int parse_token(UdevRules *rules, const char *key, char *attr, UdevRuleOp | ||
23 | op = OP_ASSIGN; | ||
24 | } | ||
25 | |||
26 | - r = rule_line_add_token(rule_line, TK_A_SECLABEL, op, value, NULL); | ||
27 | + r = rule_line_add_token(rule_line, TK_A_SECLABEL, op, value, attr); | ||
28 | } else if (streq(key, "RUN")) { | ||
29 | if (is_match || op == OP_REMOVE) | ||
30 | return log_token_invalid_op(rules, key); | ||
diff --git a/meta/recipes-core/systemd/systemd_244.3.bb b/meta/recipes-core/systemd/systemd_244.5.bb index 64e3b18333..8c95648ca0 100644 --- a/meta/recipes-core/systemd/systemd_244.3.bb +++ b/meta/recipes-core/systemd/systemd_244.5.bb | |||
@@ -20,8 +20,6 @@ SRC_URI += "file://touchscreen.rules \ | |||
20 | file://99-default.preset \ | 20 | file://99-default.preset \ |
21 | file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ | 21 | file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ |
22 | file://0003-implment-systemd-sysv-install-for-OE.patch \ | 22 | file://0003-implment-systemd-sysv-install-for-OE.patch \ |
23 | file://CVE-2020-13776.patch \ | ||
24 | file://systemd-udev-seclabel-options-crash-fix.patch \ | ||
25 | " | 23 | " |
26 | 24 | ||
27 | # patches needed by musl | 25 | # patches needed by musl |
@@ -51,6 +49,9 @@ SRC_URI_MUSL = "\ | |||
51 | file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \ | 49 | file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \ |
52 | " | 50 | " |
53 | 51 | ||
52 | # already applied in 244.5 | ||
53 | CVE_CHECK_WHITELIST += "CVE-2020-13776" | ||
54 | |||
54 | PAM_PLUGINS = " \ | 55 | PAM_PLUGINS = " \ |
55 | pam-plugin-unix \ | 56 | pam-plugin-unix \ |
56 | pam-plugin-loginuid \ | 57 | pam-plugin-loginuid \ |