diff options
22 files changed, 658 insertions, 54 deletions
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service index f6059d73cb..aec6446f0e 100644 --- a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service +++ b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service | |||
@@ -6,6 +6,7 @@ After=time-sync.target | |||
6 | 6 | ||
7 | [Service] | 7 | [Service] |
8 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ | 8 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ |
9 | ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/ | ||
9 | ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf | 10 | ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf |
10 | 11 | ||
11 | [Install] | 12 | [Install] |
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp4.service b/meta/recipes-connectivity/kea/files/kea-dhcp4.service index b851ea71c5..a2ed4edb59 100644 --- a/meta/recipes-connectivity/kea/files/kea-dhcp4.service +++ b/meta/recipes-connectivity/kea/files/kea-dhcp4.service | |||
@@ -6,6 +6,7 @@ After=time-sync.target | |||
6 | 6 | ||
7 | [Service] | 7 | [Service] |
8 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ | 8 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ |
9 | ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/ | ||
9 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea | 10 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea |
10 | ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf | 11 | ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf |
11 | 12 | ||
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp6.service b/meta/recipes-connectivity/kea/files/kea-dhcp6.service index 0f9f0ef8d9..ed6e017d0c 100644 --- a/meta/recipes-connectivity/kea/files/kea-dhcp6.service +++ b/meta/recipes-connectivity/kea/files/kea-dhcp6.service | |||
@@ -6,6 +6,7 @@ After=time-sync.target | |||
6 | 6 | ||
7 | [Service] | 7 | [Service] |
8 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ | 8 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ |
9 | ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/ | ||
9 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea | 10 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea |
10 | ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf | 11 | ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf |
11 | 12 | ||
diff --git a/meta/recipes-core/busybox/busybox/CVE-2023-39810.patch b/meta/recipes-core/busybox/busybox/CVE-2023-39810.patch new file mode 100644 index 0000000000..821ab3508f --- /dev/null +++ b/meta/recipes-core/busybox/busybox/CVE-2023-39810.patch | |||
@@ -0,0 +1,136 @@ | |||
1 | From 9a8796436b9b0641e13480811902ea2ac57881d3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Vlasenko <vda.linux@googlemail.com> | ||
3 | Date: Wed, 2 Oct 2024 10:12:05 +0200 | ||
4 | Subject: [PATCH] archival: disallow path traversals (CVE-2023-39810) | ||
5 | |||
6 | Create new configure option for archival/libarchive based extractions to | ||
7 | disallow path traversals. | ||
8 | As this is a paranoid option and might introduce backward | ||
9 | incompatibility, default it to no. | ||
10 | |||
11 | Fixes: CVE-2023-39810 | ||
12 | |||
13 | Based on the patch by Peter Kaestle <peter.kaestle@nokia.com> | ||
14 | |||
15 | function old new delta | ||
16 | data_extract_all 921 945 +24 | ||
17 | strip_unsafe_prefix 101 102 +1 | ||
18 | ------------------------------------------------------------------------------ | ||
19 | (add/remove: 0/0 grow/shrink: 2/0 up/down: 25/0) Total: 25 bytes | ||
20 | |||
21 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||
22 | |||
23 | CVE: CVE-2023-39810 | ||
24 | Upstream-Status: Backport [https://git.busybox.net/busybox/commit/?id=9a8796436b9b0641e13480811902ea2ac57881d3] | ||
25 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
26 | --- | ||
27 | archival/Config.src | 11 +++++++++++ | ||
28 | archival/libarchive/data_extract_all.c | 8 ++++++++ | ||
29 | archival/libarchive/unsafe_prefix.c | 6 +++++- | ||
30 | scripts/kconfig/lxdialog/check-lxdialog.sh | 2 +- | ||
31 | testsuite/cpio.tests | 23 ++++++++++++++++++++++ | ||
32 | 5 files changed, 48 insertions(+), 2 deletions(-) | ||
33 | |||
34 | diff --git a/archival/Config.src b/archival/Config.src | ||
35 | index 6f4f30c43..cbcd7217c 100644 | ||
36 | --- a/archival/Config.src | ||
37 | +++ b/archival/Config.src | ||
38 | @@ -35,4 +35,15 @@ config FEATURE_LZMA_FAST | ||
39 | This option reduces decompression time by about 25% at the cost of | ||
40 | a 1K bigger binary. | ||
41 | |||
42 | +config FEATURE_PATH_TRAVERSAL_PROTECTION | ||
43 | + bool "Prevent extraction of filenames with /../ path component" | ||
44 | + default n | ||
45 | + help | ||
46 | + busybox tar and unzip remove "PREFIX/../" (if it exists) | ||
47 | + from extracted names. | ||
48 | + This option enables this behavior for all other unpacking applets, | ||
49 | + such as cpio, ar, rpm. | ||
50 | + GNU cpio 2.15 has NO such sanity check. | ||
51 | +# try other archivers and document their behavior? | ||
52 | + | ||
53 | endmenu | ||
54 | diff --git a/archival/libarchive/data_extract_all.c b/archival/libarchive/data_extract_all.c | ||
55 | index 049c2c156..8a69711c1 100644 | ||
56 | --- a/archival/libarchive/data_extract_all.c | ||
57 | +++ b/archival/libarchive/data_extract_all.c | ||
58 | @@ -65,6 +65,14 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle) | ||
59 | } while (--n != 0); | ||
60 | } | ||
61 | #endif | ||
62 | +#if ENABLE_FEATURE_PATH_TRAVERSAL_PROTECTION | ||
63 | + /* Strip leading "/" and up to last "/../" path component */ | ||
64 | + dst_name = (char *)strip_unsafe_prefix(dst_name); | ||
65 | +#endif | ||
66 | +// ^^^ This may be a problem if some applets do need to extract absolute names. | ||
67 | +// (Probably will need to invent ARCHIVE_ALLOW_UNSAFE_NAME flag). | ||
68 | +// You might think that rpm needs it, but in my tests rpm's internal cpio | ||
69 | +// archive has names like "./usr/bin/FOO", not "/usr/bin/FOO". | ||
70 | |||
71 | if (archive_handle->ah_flags & ARCHIVE_CREATE_LEADING_DIRS) { | ||
72 | char *slash = strrchr(dst_name, '/'); | ||
73 | diff --git a/archival/libarchive/unsafe_prefix.c b/archival/libarchive/unsafe_prefix.c | ||
74 | index 33e487bf9..667081195 100644 | ||
75 | --- a/archival/libarchive/unsafe_prefix.c | ||
76 | +++ b/archival/libarchive/unsafe_prefix.c | ||
77 | @@ -14,7 +14,11 @@ const char* FAST_FUNC strip_unsafe_prefix(const char *str) | ||
78 | cp++; | ||
79 | continue; | ||
80 | } | ||
81 | - if (is_prefixed_with(cp, "/../"+1)) { | ||
82 | + /* We are called lots of times. | ||
83 | + * is_prefixed_with(cp, "../") is slower than open-coding it, | ||
84 | + * with minimal code growth (~few bytes). | ||
85 | + */ | ||
86 | + if (cp[0] == '.' && cp[1] == '.' && cp[2] == '/') { | ||
87 | cp += 3; | ||
88 | continue; | ||
89 | } | ||
90 | diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh | ||
91 | index 5075ebf2d..910ca1f7c 100755 | ||
92 | --- a/scripts/kconfig/lxdialog/check-lxdialog.sh | ||
93 | +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh | ||
94 | @@ -55,7 +55,7 @@ trap "rm -f $tmp" 0 1 2 3 15 | ||
95 | check() { | ||
96 | $cc -x c - -o $tmp 2>/dev/null <<'EOF' | ||
97 | #include CURSES_LOC | ||
98 | -main() {} | ||
99 | +int main() { return 0; } | ||
100 | EOF | ||
101 | if [ $? != 0 ]; then | ||
102 | echo " *** Unable to find the ncurses libraries or the" 1>&2 | ||
103 | diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests | ||
104 | index 85e746589..a4462c53e 100755 | ||
105 | --- a/testsuite/cpio.tests | ||
106 | +++ b/testsuite/cpio.tests | ||
107 | @@ -154,6 +154,29 @@ testing "cpio -R with extract" \ | ||
108 | " "" "" | ||
109 | SKIP= | ||
110 | |||
111 | +# Create an archive containing a file with "../dont_write" filename. | ||
112 | +# See that it will not be allowed to unpack. | ||
113 | +# NB: GNU cpio 2.15 DOES NOT do such checks. | ||
114 | +optional FEATURE_PATH_TRAVERSAL_PROTECTION | ||
115 | +rm -rf cpio.testdir | ||
116 | +mkdir -p cpio.testdir/prepare/inner | ||
117 | +echo "file outside of destination was written" > cpio.testdir/prepare/dont_write | ||
118 | +echo "data" > cpio.testdir/prepare/inner/to_extract | ||
119 | +mkdir -p cpio.testdir/extract | ||
120 | +testing "cpio extract file outside of destination" "\ | ||
121 | +(cd cpio.testdir/prepare/inner && echo -e '../dont_write\nto_extract' | cpio -o -H newc) | (cd cpio.testdir/extract && cpio -vi 2>&1) | ||
122 | +echo \$? | ||
123 | +ls cpio.testdir/dont_write 2>&1" \ | ||
124 | +"\ | ||
125 | +cpio: removing leading '../' from member names | ||
126 | +../dont_write | ||
127 | +to_extract | ||
128 | +1 blocks | ||
129 | +0 | ||
130 | +ls: cpio.testdir/dont_write: No such file or directory | ||
131 | +" "" "" | ||
132 | +SKIP= | ||
133 | + | ||
134 | # Clean up | ||
135 | rm -rf cpio.testdir cpio.testdir2 2>/dev/null | ||
136 | |||
diff --git a/meta/recipes-core/busybox/busybox_1.36.1.bb b/meta/recipes-core/busybox/busybox_1.36.1.bb index 69e9555766..069544cc8a 100644 --- a/meta/recipes-core/busybox/busybox_1.36.1.bb +++ b/meta/recipes-core/busybox/busybox_1.36.1.bb | |||
@@ -58,6 +58,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
58 | file://0001-awk.c-fix-CVE-2023-42366-bug-15874.patch \ | 58 | file://0001-awk.c-fix-CVE-2023-42366-bug-15874.patch \ |
59 | file://0001-cut-Fix-s-flag-to-omit-blank-lines.patch \ | 59 | file://0001-cut-Fix-s-flag-to-omit-blank-lines.patch \ |
60 | file://CVE-2022-48174.patch \ | 60 | file://CVE-2022-48174.patch \ |
61 | file://CVE-2023-39810.patch \ | ||
61 | " | 62 | " |
62 | SRC_URI:append:libc-musl = " file://musl.cfg " | 63 | SRC_URI:append:libc-musl = " file://musl.cfg " |
63 | # TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html | 64 | # TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html |
diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb index fc942e3565..a91657f7b4 100644 --- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb +++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb | |||
@@ -26,7 +26,7 @@ inherit core-image setuptools3 features_check | |||
26 | 26 | ||
27 | REQUIRED_DISTRO_FEATURES += "xattr" | 27 | REQUIRED_DISTRO_FEATURES += "xattr" |
28 | 28 | ||
29 | SRCREV ?= "1c462cc39e557276861323b7adcef4fedbdf75e9" | 29 | SRCREV ?= "e5c05018e042e762c886c2f5476f2277a787b9c6" |
30 | SRC_URI = "git://git.yoctoproject.org/poky;branch=scarthgap \ | 30 | SRC_URI = "git://git.yoctoproject.org/poky;branch=scarthgap \ |
31 | file://Yocto_Build_Appliance.vmx \ | 31 | file://Yocto_Build_Appliance.vmx \ |
32 | file://Yocto_Build_Appliance.vmxf \ | 32 | file://Yocto_Build_Appliance.vmxf \ |
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2025-49794-CVE-2025-49796.patch b/meta/recipes-core/libxml/libxml2/CVE-2025-49794-CVE-2025-49796.patch new file mode 100644 index 0000000000..881cac7f03 --- /dev/null +++ b/meta/recipes-core/libxml/libxml2/CVE-2025-49794-CVE-2025-49796.patch | |||
@@ -0,0 +1,186 @@ | |||
1 | From 71e1e8af5ee46dad1b57bb96cfbf1c3ad21fbd7b Mon Sep 17 00:00:00 2001 | ||
2 | From: Nick Wellnhofer <wellnhofer@aevum.de> | ||
3 | Date: Fri, 4 Jul 2025 14:28:26 +0200 | ||
4 | Subject: [PATCH] schematron: Fix memory safety issues in | ||
5 | xmlSchematronReportOutput | ||
6 | |||
7 | Fix use-after-free (CVE-2025-49794) and type confusion (CVE-2025-49796) | ||
8 | in xmlSchematronReportOutput. | ||
9 | |||
10 | Fixes #931. | ||
11 | Fixes #933. | ||
12 | |||
13 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/71e1e8af5ee46dad1b57bb96cfbf1c3ad21fbd7b] | ||
14 | CVE: CVE-2025-49794 CVE-2025-49796 | ||
15 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | ||
16 | --- | ||
17 | result/schematron/cve-2025-49794_0.err | 2 ++ | ||
18 | result/schematron/cve-2025-49796_0.err | 2 ++ | ||
19 | schematron.c | 49 ++++++++++++++------------ | ||
20 | test/schematron/cve-2025-49794.sct | 10 ++++++ | ||
21 | test/schematron/cve-2025-49794_0.xml | 6 ++++ | ||
22 | test/schematron/cve-2025-49796.sct | 9 +++++ | ||
23 | test/schematron/cve-2025-49796_0.xml | 3 ++ | ||
24 | 7 files changed, 58 insertions(+), 23 deletions(-) | ||
25 | create mode 100644 result/schematron/cve-2025-49794_0.err | ||
26 | create mode 100644 result/schematron/cve-2025-49796_0.err | ||
27 | create mode 100644 test/schematron/cve-2025-49794.sct | ||
28 | create mode 100644 test/schematron/cve-2025-49794_0.xml | ||
29 | create mode 100644 test/schematron/cve-2025-49796.sct | ||
30 | create mode 100644 test/schematron/cve-2025-49796_0.xml | ||
31 | |||
32 | diff --git a/result/schematron/cve-2025-49794_0.err b/result/schematron/cve-2025-49794_0.err | ||
33 | new file mode 100644 | ||
34 | index 0000000..5775231 | ||
35 | --- /dev/null | ||
36 | +++ b/result/schematron/cve-2025-49794_0.err | ||
37 | @@ -0,0 +1,2 @@ | ||
38 | +./test/schematron/cve-2025-49794_0.xml:2: element boo0: schematron error : /librar0/boo0 line 2: | ||
39 | +./test/schematron/cve-2025-49794_0.xml fails to validate | ||
40 | diff --git a/result/schematron/cve-2025-49796_0.err b/result/schematron/cve-2025-49796_0.err | ||
41 | new file mode 100644 | ||
42 | index 0000000..bf875ee | ||
43 | --- /dev/null | ||
44 | +++ b/result/schematron/cve-2025-49796_0.err | ||
45 | @@ -0,0 +1,2 @@ | ||
46 | +./test/schematron/cve-2025-49796_0.xml:2: element boo0: schematron error : /librar0/boo0 line 2: | ||
47 | +./test/schematron/cve-2025-49796_0.xml fails to validate | ||
48 | diff --git a/schematron.c b/schematron.c | ||
49 | index a825920..411a515 100644 | ||
50 | --- a/schematron.c | ||
51 | +++ b/schematron.c | ||
52 | @@ -1389,27 +1389,15 @@ exit: | ||
53 | * * | ||
54 | ************************************************************************/ | ||
55 | |||
56 | -static xmlNodePtr | ||
57 | +static xmlXPathObjectPtr | ||
58 | xmlSchematronGetNode(xmlSchematronValidCtxtPtr ctxt, | ||
59 | xmlNodePtr cur, const xmlChar *xpath) { | ||
60 | - xmlNodePtr node = NULL; | ||
61 | - xmlXPathObjectPtr ret; | ||
62 | - | ||
63 | if ((ctxt == NULL) || (cur == NULL) || (xpath == NULL)) | ||
64 | return(NULL); | ||
65 | |||
66 | ctxt->xctxt->doc = cur->doc; | ||
67 | ctxt->xctxt->node = cur; | ||
68 | - ret = xmlXPathEval(xpath, ctxt->xctxt); | ||
69 | - if (ret == NULL) | ||
70 | - return(NULL); | ||
71 | - | ||
72 | - if ((ret->type == XPATH_NODESET) && | ||
73 | - (ret->nodesetval != NULL) && (ret->nodesetval->nodeNr > 0)) | ||
74 | - node = ret->nodesetval->nodeTab[0]; | ||
75 | - | ||
76 | - xmlXPathFreeObject(ret); | ||
77 | - return(node); | ||
78 | + return(xmlXPathEval(xpath, ctxt->xctxt)); | ||
79 | } | ||
80 | |||
81 | /** | ||
82 | @@ -1455,25 +1443,40 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt, | ||
83 | (child->type == XML_CDATA_SECTION_NODE)) | ||
84 | ret = xmlStrcat(ret, child->content); | ||
85 | else if (IS_SCHEMATRON(child, "name")) { | ||
86 | + xmlXPathObject *obj = NULL; | ||
87 | xmlChar *path; | ||
88 | |||
89 | path = xmlGetNoNsProp(child, BAD_CAST "path"); | ||
90 | |||
91 | node = cur; | ||
92 | if (path != NULL) { | ||
93 | - node = xmlSchematronGetNode(ctxt, cur, path); | ||
94 | - if (node == NULL) | ||
95 | - node = cur; | ||
96 | + obj = xmlSchematronGetNode(ctxt, cur, path); | ||
97 | + if ((obj != NULL) && | ||
98 | + (obj->type == XPATH_NODESET) && | ||
99 | + (obj->nodesetval != NULL) && | ||
100 | + (obj->nodesetval->nodeNr > 0)) | ||
101 | + node = obj->nodesetval->nodeTab[0]; | ||
102 | xmlFree(path); | ||
103 | } | ||
104 | |||
105 | - if ((node->ns == NULL) || (node->ns->prefix == NULL)) | ||
106 | - ret = xmlStrcat(ret, node->name); | ||
107 | - else { | ||
108 | - ret = xmlStrcat(ret, node->ns->prefix); | ||
109 | - ret = xmlStrcat(ret, BAD_CAST ":"); | ||
110 | - ret = xmlStrcat(ret, node->name); | ||
111 | + switch (node->type) { | ||
112 | + case XML_ELEMENT_NODE: | ||
113 | + case XML_ATTRIBUTE_NODE: | ||
114 | + if ((node->ns == NULL) || (node->ns->prefix == NULL)) | ||
115 | + ret = xmlStrcat(ret, node->name); | ||
116 | + else { | ||
117 | + ret = xmlStrcat(ret, node->ns->prefix); | ||
118 | + ret = xmlStrcat(ret, BAD_CAST ":"); | ||
119 | + ret = xmlStrcat(ret, node->name); | ||
120 | + } | ||
121 | + break; | ||
122 | + | ||
123 | + /* TODO: handle other node types */ | ||
124 | + default: | ||
125 | + break; | ||
126 | } | ||
127 | + | ||
128 | + xmlXPathFreeObject(obj); | ||
129 | } else if (IS_SCHEMATRON(child, "value-of")) { | ||
130 | xmlChar *select; | ||
131 | xmlXPathObjectPtr eval; | ||
132 | diff --git a/test/schematron/cve-2025-49794.sct b/test/schematron/cve-2025-49794.sct | ||
133 | new file mode 100644 | ||
134 | index 0000000..7fc9ee3 | ||
135 | --- /dev/null | ||
136 | +++ b/test/schematron/cve-2025-49794.sct | ||
137 | @@ -0,0 +1,10 @@ | ||
138 | +<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> | ||
139 | + <sch:pattern id=""> | ||
140 | + <sch:rule context="boo0"> | ||
141 | + <sch:report test="not(0)"> | ||
142 | + <sch:name path="	e|namespace::*|e"/> | ||
143 | + </sch:report> | ||
144 | + <sch:report test="0"></sch:report> | ||
145 | + </sch:rule> | ||
146 | + </sch:pattern> | ||
147 | +</sch:schema> | ||
148 | diff --git a/test/schematron/cve-2025-49794_0.xml b/test/schematron/cve-2025-49794_0.xml | ||
149 | new file mode 100644 | ||
150 | index 0000000..debc64b | ||
151 | --- /dev/null | ||
152 | +++ b/test/schematron/cve-2025-49794_0.xml | ||
153 | @@ -0,0 +1,6 @@ | ||
154 | +<librar0> | ||
155 | + <boo0 t=""> | ||
156 | + <author></author> | ||
157 | + </boo0> | ||
158 | + <ins></ins> | ||
159 | +</librar0> | ||
160 | diff --git a/test/schematron/cve-2025-49796.sct b/test/schematron/cve-2025-49796.sct | ||
161 | new file mode 100644 | ||
162 | index 0000000..e9702d7 | ||
163 | --- /dev/null | ||
164 | +++ b/test/schematron/cve-2025-49796.sct | ||
165 | @@ -0,0 +1,9 @@ | ||
166 | +<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> | ||
167 | + <sch:pattern id=""> | ||
168 | + <sch:rule context="boo0"> | ||
169 | + <sch:report test="not(0)"> | ||
170 | + <sch:name path="/"/> | ||
171 | + </sch:report> | ||
172 | + </sch:rule> | ||
173 | + </sch:pattern> | ||
174 | +</sch:schema> | ||
175 | diff --git a/test/schematron/cve-2025-49796_0.xml b/test/schematron/cve-2025-49796_0.xml | ||
176 | new file mode 100644 | ||
177 | index 0000000..be33c4e | ||
178 | --- /dev/null | ||
179 | +++ b/test/schematron/cve-2025-49796_0.xml | ||
180 | @@ -0,0 +1,3 @@ | ||
181 | +<librar0> | ||
182 | + <boo0/> | ||
183 | +</librar0> | ||
184 | -- | ||
185 | 2.49.0 | ||
186 | |||
diff --git a/meta/recipes-core/libxml/libxml2_2.12.10.bb b/meta/recipes-core/libxml/libxml2_2.12.10.bb index 1ecac70b4c..488ace62e5 100644 --- a/meta/recipes-core/libxml/libxml2_2.12.10.bb +++ b/meta/recipes-core/libxml/libxml2_2.12.10.bb | |||
@@ -21,6 +21,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testt | |||
21 | file://CVE-2025-32414.patch \ | 21 | file://CVE-2025-32414.patch \ |
22 | file://CVE-2025-32415.patch \ | 22 | file://CVE-2025-32415.patch \ |
23 | file://CVE-2025-6021.patch \ | 23 | file://CVE-2025-6021.patch \ |
24 | file://CVE-2025-49794-CVE-2025-49796.patch \ | ||
24 | " | 25 | " |
25 | 26 | ||
26 | SRC_URI[archive.sha256sum] = "c3d8c0c34aa39098f66576fe51969db12a5100b956233dc56506f7a8679be995" | 27 | SRC_URI[archive.sha256sum] = "c3d8c0c34aa39098f66576fe51969db12a5100b956233dc56506f7a8679be995" |
diff --git a/meta/recipes-core/systemd/systemd/0003-timedated-Respond-on-org.freedesktop.timedate1.SetNT.patch b/meta/recipes-core/systemd/systemd/0003-timedated-Respond-on-org.freedesktop.timedate1.SetNT.patch new file mode 100644 index 0000000000..c1d8a94bf7 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0003-timedated-Respond-on-org.freedesktop.timedate1.SetNT.patch | |||
@@ -0,0 +1,97 @@ | |||
1 | From 3a51e31be9f626cf772733cb289ed64739fab0e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com> | ||
3 | Date: Tue, 20 Feb 2024 19:26:16 +0100 | ||
4 | Subject: [PATCH] timedated: Respond on org.freedesktop.timedate1.SetNTP only | ||
5 | when really finished | ||
6 | |||
7 | The method returns prematurely (before jobs it triggers terminate). This | ||
8 | is externally visible because other methods may fail if jobs did not | ||
9 | finish. | ||
10 | Postpone the DBus method response until we collect all signals for | ||
11 | finished jobs. | ||
12 | systemd-timedated keeps track of in-flight DBus requests and answers | ||
13 | them all in unspecified order when jobs finish. The capacity of requests | ||
14 | in systemd-timedated is limited. | ||
15 | |||
16 | Fixes: #17739 | ||
17 | |||
18 | Upstream-Status: Backport [https://github.com/systemd/systemd/commit/3a51e31be9f626cf772733cb289ed64739fab0e4] | ||
19 | Signed-off-by: Michal Seben <michal.seben@siemens.com> | ||
20 | --- | ||
21 | src/timedate/timedated.c | 21 ++++++++++++++++++--- | ||
22 | 1 file changed, 18 insertions(+), 3 deletions(-) | ||
23 | |||
24 | Index: git/src/timedate/timedated.c | ||
25 | =================================================================== | ||
26 | --- git.orig/src/timedate/timedated.c | ||
27 | +++ git/src/timedate/timedated.c | ||
28 | @@ -45,6 +45,7 @@ | ||
29 | #define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n" | ||
30 | |||
31 | #define UNIT_LIST_DIRS (const char* const*) CONF_PATHS_STRV("systemd/ntp-units.d") | ||
32 | +#define SET_NTP_IN_FLIGHT_MAX 16 | ||
33 | |||
34 | typedef struct UnitStatusInfo { | ||
35 | char *name; | ||
36 | @@ -61,6 +62,7 @@ typedef struct Context { | ||
37 | bool local_rtc; | ||
38 | Hashmap *polkit_registry; | ||
39 | sd_bus_message *cache; | ||
40 | + Set *set_ntp_calls; | ||
41 | |||
42 | sd_bus_slot *slot_job_removed; | ||
43 | |||
44 | @@ -121,6 +123,7 @@ static void context_clear(Context *c) { | ||
45 | free(c->zone); | ||
46 | bus_verify_polkit_async_registry_free(c->polkit_registry); | ||
47 | sd_bus_message_unref(c->cache); | ||
48 | + set_free(c->set_ntp_calls); | ||
49 | |||
50 | sd_bus_slot_unref(c->slot_job_removed); | ||
51 | |||
52 | @@ -461,11 +464,19 @@ static int match_job_removed(sd_bus_mess | ||
53 | n += !!u->path; | ||
54 | |||
55 | if (n == 0) { | ||
56 | + sd_bus_message *cm; | ||
57 | + | ||
58 | c->slot_job_removed = sd_bus_slot_unref(c->slot_job_removed); | ||
59 | |||
60 | (void) sd_bus_emit_properties_changed(sd_bus_message_get_bus(m), | ||
61 | "/org/freedesktop/timedate1", "org.freedesktop.timedate1", "NTP", | ||
62 | NULL); | ||
63 | + while ((cm = set_steal_first(c->set_ntp_calls))) { | ||
64 | + r = sd_bus_reply_method_return(cm, NULL); | ||
65 | + if (r < 0) | ||
66 | + log_debug_errno(r, "Failed to reply to SetNTP method call, ignoring: %m"); | ||
67 | + sd_bus_message_unref(cm); | ||
68 | + } | ||
69 | } | ||
70 | |||
71 | return 0; | ||
72 | @@ -944,6 +955,9 @@ static int method_set_ntp(sd_bus_message | ||
73 | LIST_FOREACH(units, u, c->units) | ||
74 | u->path = mfree(u->path); | ||
75 | |||
76 | + if (set_size(c->set_ntp_calls) >= SET_NTP_IN_FLIGHT_MAX) | ||
77 | + return sd_bus_error_set_errnof(error, EAGAIN, "Too many calls in flight."); | ||
78 | + | ||
79 | if (!c->slot_job_removed) { | ||
80 | r = bus_match_signal_async( | ||
81 | bus, | ||
82 | @@ -998,11 +1012,12 @@ static int method_set_ntp(sd_bus_message | ||
83 | c->slot_job_removed = TAKE_PTR(slot); | ||
84 | |||
85 | if (selected) | ||
86 | - log_info("Set NTP to enabled (%s).", selected->name); | ||
87 | + log_info("Set NTP to be enabled (%s).", selected->name); | ||
88 | else | ||
89 | - log_info("Set NTP to disabled."); | ||
90 | + log_info("Set NTP to be disabled."); | ||
91 | |||
92 | - return sd_bus_reply_method_return(m, NULL); | ||
93 | + /* Asynchrounous reply to m in match_job_removed() */ | ||
94 | + return set_ensure_consume(&c->set_ntp_calls, &bus_message_hash_ops, sd_bus_message_ref(m)); | ||
95 | } | ||
96 | |||
97 | static int method_list_timezones(sd_bus_message *m, void *userdata, sd_bus_error *error) { | ||
diff --git a/meta/recipes-core/systemd/systemd_255.21.bb b/meta/recipes-core/systemd/systemd_255.21.bb index bb9dc3da33..e866f9921b 100644 --- a/meta/recipes-core/systemd/systemd_255.21.bb +++ b/meta/recipes-core/systemd/systemd_255.21.bb | |||
@@ -27,6 +27,7 @@ SRC_URI += " \ | |||
27 | file://99-default.preset \ | 27 | file://99-default.preset \ |
28 | file://systemd-pager.sh \ | 28 | file://systemd-pager.sh \ |
29 | file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ | 29 | file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ |
30 | file://0003-timedated-Respond-on-org.freedesktop.timedate1.SetNT.patch \ | ||
30 | file://0008-implment-systemd-sysv-install-for-OE.patch \ | 31 | file://0008-implment-systemd-sysv-install-for-OE.patch \ |
31 | " | 32 | " |
32 | 33 | ||
diff --git a/meta/recipes-devtools/binutils/binutils-2.42.inc b/meta/recipes-devtools/binutils/binutils-2.42.inc index ea018a48a3..9471e6accd 100644 --- a/meta/recipes-devtools/binutils/binutils-2.42.inc +++ b/meta/recipes-devtools/binutils/binutils-2.42.inc | |||
@@ -21,7 +21,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)" | |||
21 | CVE_STATUS[CVE-2023-25584] = "cpe-incorrect: Applies only for version 2.40 and earlier" | 21 | CVE_STATUS[CVE-2023-25584] = "cpe-incorrect: Applies only for version 2.40 and earlier" |
22 | CVE_STATUS[CVE-2025-1180] = "patched: fixed by patch for CVE-2025-1176" | 22 | CVE_STATUS[CVE-2025-1180] = "patched: fixed by patch for CVE-2025-1176" |
23 | 23 | ||
24 | SRCREV ?= "6558f9f5f0ccc107a083ae7fbf106ebcb5efa817" | 24 | SRCREV ?= "f9488b0d92b591bdf3ff8cce485cb0e1b3727cc0" |
25 | BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https" | 25 | BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https" |
26 | SRC_URI = "\ | 26 | SRC_URI = "\ |
27 | ${BINUTILS_GIT_URI} \ | 27 | ${BINUTILS_GIT_URI} \ |
diff --git a/meta/recipes-devtools/git/git_2.44.3.bb b/meta/recipes-devtools/git/git_2.44.4.bb index 7b33d6071e..66936417e1 100644 --- a/meta/recipes-devtools/git/git_2.44.3.bb +++ b/meta/recipes-devtools/git/git_2.44.4.bb | |||
@@ -172,4 +172,4 @@ EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ | |||
172 | " | 172 | " |
173 | EXTRA_OEMAKE += "NO_GETTEXT=1" | 173 | EXTRA_OEMAKE += "NO_GETTEXT=1" |
174 | 174 | ||
175 | SRC_URI[tarball.sha256sum] = "4237c37cdf7b3d38102117b22993b2f761a4c02758dfbe33f7b7423c0b096ca9" | 175 | SRC_URI[tarball.sha256sum] = "302ebe0f4b1c5d1ee477b5ee74f7f2f69efd8fa7f27481e45087ba9a4bb4851c" |
diff --git a/meta/recipes-devtools/python/python3_3.12.11.bb b/meta/recipes-devtools/python/python3_3.12.11.bb index 706dabb5cd..84c4f74158 100644 --- a/meta/recipes-devtools/python/python3_3.12.11.bb +++ b/meta/recipes-devtools/python/python3_3.12.11.bb | |||
@@ -45,7 +45,7 @@ SRC_URI[sha256sum] = "c30bb24b7f1e9a19b11b55a546434f74e739bb4c271a3e3a80ff4380d4 | |||
45 | # exclude pre-releases for both python 2.x and 3.x | 45 | # exclude pre-releases for both python 2.x and 3.x |
46 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" | 46 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" |
47 | 47 | ||
48 | CVE_PRODUCT = "python cpython" | 48 | CVE_PRODUCT = "python:python python_software_foundation:python cpython" |
49 | 49 | ||
50 | CVE_STATUS[CVE-2007-4559] = "disputed: Upstream consider this expected behaviour" | 50 | CVE_STATUS[CVE-2007-4559] = "disputed: Upstream consider this expected behaviour" |
51 | CVE_STATUS[CVE-2019-18348] = "not-applicable-config: This is not exploitable when glibc has CVE-2016-10739 fixed" | 51 | CVE_STATUS[CVE-2019-18348] = "not-applicable-config: This is not exploitable when glibc has CVE-2016-10739 fixed" |
diff --git a/meta/recipes-extended/iputils/iputils/CVE-2025-48964.patch b/meta/recipes-extended/iputils/iputils/CVE-2025-48964.patch new file mode 100644 index 0000000000..fc2352c99c --- /dev/null +++ b/meta/recipes-extended/iputils/iputils/CVE-2025-48964.patch | |||
@@ -0,0 +1,99 @@ | |||
1 | From afa36390394a6e0cceba03b52b59b6d41710608c Mon Sep 17 00:00:00 2001 | ||
2 | From: Cyril Hrubis <metan@ucw.cz> | ||
3 | Date: Fri, 16 May 2025 17:57:10 +0200 | ||
4 | Subject: [PATCH] ping: Fix moving average rtt calculation | ||
5 | |||
6 | The rts->rtt counts an exponential weight moving average in a fixed | ||
7 | point, that means that even if we limit the triptime to fit into a 32bit | ||
8 | number the average will overflow because because fixed point needs eight | ||
9 | more bits. | ||
10 | |||
11 | We also have to limit the triptime to 32bit number because otherwise the | ||
12 | moving average may stil overflow if we manage to produce a large enough | ||
13 | triptime. | ||
14 | |||
15 | Fixes: CVE-2025-48964 | ||
16 | Fixes: https://bugzilla.suse.com/show_bug.cgi?id=1243772 | ||
17 | Closes: https://github.com/iputils/iputils-ghsa-25fr-jw29-74f9/pull/1 | ||
18 | Reported-by: Mohamed Maatallah <hotelsmaatallahrecemail@gmail.com> | ||
19 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
20 | Tested-by: Petr Vorel <pvorel@suse.cz> | ||
21 | Reviewed-by: Michal Kubecek <mkubecek@suse.cz> | ||
22 | Reviewed-by: Mohamed Maatallah <hotelsmaatallahrecemail@gmail.com> | ||
23 | Signed-off-by: Cyril Hrubis <metan@ucw.cz> | ||
24 | |||
25 | CVE: CVE-2025-48964 | ||
26 | Upstream-Status: Backport [https://github.com/iputils/iputils/commit/afa36390394a6e0cceba03b52b59b6d41710608c] | ||
27 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
28 | --- | ||
29 | iputils_common.h | 2 +- | ||
30 | ping/ping.h | 2 +- | ||
31 | ping/ping_common.c | 8 ++++---- | ||
32 | 3 files changed, 6 insertions(+), 6 deletions(-) | ||
33 | |||
34 | diff --git a/iputils_common.h b/iputils_common.h | ||
35 | index 829a749..1296905 100644 | ||
36 | --- a/iputils_common.h | ||
37 | +++ b/iputils_common.h | ||
38 | @@ -11,7 +11,7 @@ | ||
39 | __typeof__(&arr[0]))])) * 0) | ||
40 | |||
41 | /* 1000001 = 1000000 tv_sec + 1 tv_usec */ | ||
42 | -#define TV_SEC_MAX_VAL (LONG_MAX/1000001) | ||
43 | +#define TV_SEC_MAX_VAL (INT32_MAX/1000001) | ||
44 | |||
45 | #ifdef __GNUC__ | ||
46 | # define iputils_attribute_format(t, n, m) __attribute__((__format__ (t, n, m))) | ||
47 | diff --git a/ping/ping.h b/ping/ping.h | ||
48 | index 4dce538..bc1fab2 100644 | ||
49 | --- a/ping/ping.h | ||
50 | +++ b/ping/ping.h | ||
51 | @@ -191,7 +191,7 @@ struct ping_rts { | ||
52 | long tmax; /* maximum round trip time */ | ||
53 | double tsum; /* sum of all times, for doing average */ | ||
54 | double tsum2; | ||
55 | - int rtt; | ||
56 | + uint64_t rtt; /* Exponential weight moving average calculated in fixed point */ | ||
57 | int rtt_addend; | ||
58 | uint16_t acked; | ||
59 | int pipesize; | ||
60 | diff --git a/ping/ping_common.c b/ping/ping_common.c | ||
61 | index 2a3e556..fad5228 100644 | ||
62 | --- a/ping/ping_common.c | ||
63 | +++ b/ping/ping_common.c | ||
64 | @@ -282,7 +282,7 @@ int __schedule_exit(int next) | ||
65 | |||
66 | static inline void update_interval(struct ping_rts *rts) | ||
67 | { | ||
68 | - int est = rts->rtt ? rts->rtt / 8 : rts->interval * 1000; | ||
69 | + int est = rts->rtt ? (int)(rts->rtt / 8) : rts->interval * 1000; | ||
70 | |||
71 | rts->interval = (est + rts->rtt_addend + 500) / 1000; | ||
72 | if (rts->uid && rts->interval < MIN_USER_INTERVAL_MS) | ||
73 | @@ -778,7 +778,7 @@ restamp: | ||
74 | if (triptime > rts->tmax) | ||
75 | rts->tmax = triptime; | ||
76 | if (!rts->rtt) | ||
77 | - rts->rtt = triptime * 8; | ||
78 | + rts->rtt = ((uint64_t)triptime) * 8; | ||
79 | else | ||
80 | rts->rtt += triptime - rts->rtt / 8; | ||
81 | if (rts->opt_adaptive) | ||
82 | @@ -948,7 +948,7 @@ int finish(struct ping_rts *rts) | ||
83 | int ipg = (1000000 * (long long)tv.tv_sec + tv.tv_nsec / 1000) / (rts->ntransmitted - 1); | ||
84 | |||
85 | printf(_("%sipg/ewma %d.%03d/%d.%03d ms"), | ||
86 | - comma, ipg / 1000, ipg % 1000, rts->rtt / 8000, (rts->rtt / 8) % 1000); | ||
87 | + comma, ipg / 1000, ipg % 1000, (int)(rts->rtt / 8000), (int)((rts->rtt / 8) % 1000)); | ||
88 | } | ||
89 | putchar('\n'); | ||
90 | return (!rts->nreceived || (rts->deadline && rts->nreceived < rts->npackets)); | ||
91 | @@ -973,7 +973,7 @@ void status(struct ping_rts *rts) | ||
92 | fprintf(stderr, _(", min/avg/ewma/max = %ld.%03ld/%lu.%03ld/%d.%03d/%ld.%03ld ms"), | ||
93 | (long)rts->tmin / 1000, (long)rts->tmin % 1000, | ||
94 | tavg / 1000, tavg % 1000, | ||
95 | - rts->rtt / 8000, (rts->rtt / 8) % 1000, (long)rts->tmax / 1000, (long)rts->tmax % 1000); | ||
96 | + (int)(rts->rtt / 8000), (int)((rts->rtt / 8) % 1000), (long)rts->tmax / 1000, (long)rts->tmax % 1000); | ||
97 | } | ||
98 | fprintf(stderr, "\n"); | ||
99 | } | ||
diff --git a/meta/recipes-extended/iputils/iputils_20240117.bb b/meta/recipes-extended/iputils/iputils_20240117.bb index 5ff5af8847..21494cae2b 100644 --- a/meta/recipes-extended/iputils/iputils_20240117.bb +++ b/meta/recipes-extended/iputils/iputils_20240117.bb | |||
@@ -12,6 +12,7 @@ DEPENDS = "gnutls" | |||
12 | 12 | ||
13 | SRC_URI = "git://github.com/iputils/iputils;branch=master;protocol=https \ | 13 | SRC_URI = "git://github.com/iputils/iputils;branch=master;protocol=https \ |
14 | file://CVE-2025-47268.patch \ | 14 | file://CVE-2025-47268.patch \ |
15 | file://CVE-2025-48964.patch \ | ||
15 | " | 16 | " |
16 | SRCREV = "8372f355bdf7a9b0c79338dd8ef8464c00a5c4e2" | 17 | SRCREV = "8372f355bdf7a9b0c79338dd8ef8464c00a5c4e2" |
17 | 18 | ||
diff --git a/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch b/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch index 041c717e00..1989c5abd7 100644 --- a/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch +++ b/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6e835350b7413210c410d3578cfab804186b7a4f Mon Sep 17 00:00:00 2001 | 1 | From 8c69192754ba73dd6e3273728a21aa73988f4bfb Mon Sep 17 00:00:00 2001 |
2 | From: Kai Kang <kai.kang@windriver.com> | 2 | From: Kai Kang <kai.kang@windriver.com> |
3 | Date: Tue, 17 Nov 2020 11:13:40 +0800 | 3 | Date: Tue, 17 Nov 2020 11:13:40 +0800 |
4 | Subject: [PATCH] sudo.conf.in: fix conflict with multilib | 4 | Subject: [PATCH] sudo.conf.in: fix conflict with multilib |
@@ -15,13 +15,12 @@ Update the comments in sudo.conf.in to avoid the conflict. | |||
15 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | 15 | Signed-off-by: Kai Kang <kai.kang@windriver.com> |
16 | 16 | ||
17 | Upstream-Status: Inappropriate [OE configuration specific] | 17 | Upstream-Status: Inappropriate [OE configuration specific] |
18 | |||
19 | --- | 18 | --- |
20 | examples/sudo.conf.in | 8 ++++---- | 19 | examples/sudo.conf.in | 8 ++++---- |
21 | 1 file changed, 4 insertions(+), 4 deletions(-) | 20 | 1 file changed, 4 insertions(+), 4 deletions(-) |
22 | 21 | ||
23 | diff --git a/examples/sudo.conf.in b/examples/sudo.conf.in | 22 | diff --git a/examples/sudo.conf.in b/examples/sudo.conf.in |
24 | index 2187457..0908d24 100644 | 23 | index bdd676c..094341c 100644 |
25 | --- a/examples/sudo.conf.in | 24 | --- a/examples/sudo.conf.in |
26 | +++ b/examples/sudo.conf.in | 25 | +++ b/examples/sudo.conf.in |
27 | @@ -4,7 +4,7 @@ | 26 | @@ -4,7 +4,7 @@ |
@@ -53,7 +52,7 @@ index 2187457..0908d24 100644 | |||
53 | # Sudo plugin directory: | 52 | # Sudo plugin directory: |
54 | @@ -74,7 +74,7 @@ | 53 | @@ -74,7 +74,7 @@ |
55 | # The default directory to use when searching for plugins that are | 54 | # The default directory to use when searching for plugins that are |
56 | # specified without a fully qualified path name. | 55 | # specified without a fully-qualified path name. |
57 | # | 56 | # |
58 | -#Path plugin_dir @plugindir@ | 57 | -#Path plugin_dir @plugindir@ |
59 | +#Path plugin_dir $plugindir | 58 | +#Path plugin_dir $plugindir |
diff --git a/meta/recipes-extended/sudo/files/CVE-2025-32462.patch b/meta/recipes-extended/sudo/files/CVE-2025-32462.patch deleted file mode 100644 index 04610d40fd..0000000000 --- a/meta/recipes-extended/sudo/files/CVE-2025-32462.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From d530367828e3713d09489872743eb92d31fb11ff Mon Sep 17 00:00:00 2001 | ||
2 | From: "Todd C. Miller" <Todd.Miller@sudo.ws> | ||
3 | Date: Tue, 1 Apr 2025 09:24:51 -0600 | ||
4 | Subject: [PATCH] Only allow a remote host to be specified when listing | ||
5 | privileges. | ||
6 | |||
7 | This fixes a bug where a user with sudoers privileges on a different | ||
8 | host could execute a command on the local host, even if the sudoers | ||
9 | file would not otherwise allow this. CVE-2025-32462 | ||
10 | |||
11 | Reported by Rich Mirch @ Stratascale Cyber Research Unit (CRU). | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/sudo-project/sudo/commit/d530367828e3713d09489872743eb92d31fb11ff] | ||
14 | CVE: CVE-2025-32462 | ||
15 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
16 | --- | ||
17 | plugins/sudoers/sudoers.c | 12 ++++++++++++ | ||
18 | 1 file changed, 12 insertions(+) | ||
19 | |||
20 | diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c | ||
21 | index 70a0c1a528..ad2fa2f61c 100644 | ||
22 | --- a/plugins/sudoers/sudoers.c | ||
23 | +++ b/plugins/sudoers/sudoers.c | ||
24 | @@ -350,6 +350,18 @@ sudoers_check_common(struct sudoers_context *ctx, int pwflag) | ||
25 | time_t now; | ||
26 | debug_decl(sudoers_check_common, SUDOERS_DEBUG_PLUGIN); | ||
27 | |||
28 | + /* The user may only specify a host for "sudo -l". */ | ||
29 | + if (!ISSET(ctx->mode, MODE_LIST|MODE_CHECK)) { | ||
30 | + if (strcmp(ctx->runas.host, ctx->user.host) != 0) { | ||
31 | + log_warningx(ctx, SLOG_NO_STDERR|SLOG_AUDIT, | ||
32 | + N_("user not allowed to set remote host for command")); | ||
33 | + sudo_warnx("%s", | ||
34 | + U_("a remote host may only be specified when listing privileges.")); | ||
35 | + ret = false; | ||
36 | + goto done; | ||
37 | + } | ||
38 | + } | ||
39 | + | ||
40 | /* If given the -P option, set the "preserve_groups" flag. */ | ||
41 | if (ISSET(ctx->mode, MODE_PRESERVE_GROUPS)) | ||
42 | def_preserve_groups = true; | ||
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc index feb1cf35a7..a23de1fcf7 100644 --- a/meta/recipes-extended/sudo/sudo.inc +++ b/meta/recipes-extended/sudo/sudo.inc | |||
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.sudo.ws" | |||
4 | BUGTRACKER = "http://www.sudo.ws/bugs/" | 4 | BUGTRACKER = "http://www.sudo.ws/bugs/" |
5 | SECTION = "admin" | 5 | SECTION = "admin" |
6 | LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & Zlib" | 6 | LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & Zlib" |
7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5100e20d35f9015f9eef6bdb27ba194f \ | 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=2841c822e587db145364ca95e9be2ffa \ |
8 | file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=03e35317699ba00b496251e0dfe9f109 \ | 8 | file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=03e35317699ba00b496251e0dfe9f109 \ |
9 | file://lib/util/reallocarray.c;beginline=3;endline=15;md5=397dd45c7683e90b9f8bf24638cf03bf \ | 9 | file://lib/util/reallocarray.c;beginline=3;endline=15;md5=397dd45c7683e90b9f8bf24638cf03bf \ |
10 | file://lib/util/fnmatch.c;beginline=3;endline=27;md5=004d7d2866ba1f5b41174906849d2e0f \ | 10 | file://lib/util/fnmatch.c;beginline=3;endline=27;md5=004d7d2866ba1f5b41174906849d2e0f \ |
diff --git a/meta/recipes-extended/sudo/sudo_1.9.15p5.bb b/meta/recipes-extended/sudo/sudo_1.9.17p1.bb index 30860eb75e..c5d57da9f0 100644 --- a/meta/recipes-extended/sudo/sudo_1.9.15p5.bb +++ b/meta/recipes-extended/sudo/sudo_1.9.17p1.bb | |||
@@ -1,14 +1,65 @@ | |||
1 | # FIXME: the LIC_FILES_CHKSUM values have been updated by 'devtool upgrade'. | ||
2 | # The following is the difference between the old and the new license text. | ||
3 | # Please update the LICENSE value if needed, and summarize the changes in | ||
4 | # the commit message via 'License-Update:' tag. | ||
5 | # (example: 'License-Update: copyright years updated.') | ||
6 | # | ||
7 | # The changes: | ||
8 | # | ||
9 | # --- LICENSE.md | ||
10 | # +++ LICENSE.md | ||
11 | # @@ -1,6 +1,6 @@ | ||
12 | # Sudo is distributed under the following license: | ||
13 | # | ||
14 | # - Copyright (c) 1994-1996, 1998-2023 | ||
15 | # + Copyright (c) 1994-1996, 1998-2025 | ||
16 | # Todd C. Miller <Todd.Miller@sudo.ws> | ||
17 | # | ||
18 | # Permission to use, copy, modify, and distribute this software for any | ||
19 | # @@ -247,9 +247,9 @@ | ||
20 | # | ||
21 | # The file arc4random.c bears the following license: | ||
22 | # | ||
23 | # - Copyright (c) 1996, David Mazieres <dm@uun.org> | ||
24 | # - Copyright (c) 2008, Damien Miller <djm@openbsd.org> | ||
25 | # - Copyright (c) 2013, Markus Friedl <markus@openbsd.org> | ||
26 | # + Copyright (c) 1996, David Mazieres <dm@uun.org> | ||
27 | # + Copyright (c) 2008, Damien Miller <djm@openbsd.org> | ||
28 | # + Copyright (c) 2013, Markus Friedl <markus@openbsd.org> | ||
29 | # Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org> | ||
30 | # | ||
31 | # Permission to use, copy, modify, and distribute this software for any | ||
32 | # @@ -282,7 +282,7 @@ | ||
33 | # | ||
34 | # The file getentropy.c bears the following license: | ||
35 | # | ||
36 | # - Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> | ||
37 | # + Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> | ||
38 | # Copyright (c) 2014 Bob Beck <beck@obtuse.com> | ||
39 | # | ||
40 | # Permission to use, copy, modify, and distribute this software for any | ||
41 | # @@ -299,7 +299,7 @@ | ||
42 | # | ||
43 | # The embedded copy of zlib bears the following license: | ||
44 | # | ||
45 | # - Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler | ||
46 | # + Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler | ||
47 | # | ||
48 | # This software is provided 'as-is', without any express or implied | ||
49 | # warranty. In no event will the authors be held liable for any damages | ||
50 | # | ||
51 | # | ||
52 | |||
1 | require sudo.inc | 53 | require sudo.inc |
2 | 54 | ||
3 | SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \ | 55 | SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \ |
4 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | 56 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ |
5 | file://0001-sudo.conf.in-fix-conflict-with-multilib.patch \ | 57 | file://0001-sudo.conf.in-fix-conflict-with-multilib.patch \ |
6 | file://CVE-2025-32462.patch \ | ||
7 | " | 58 | " |
8 | 59 | ||
9 | PAM_SRC_URI = "file://sudo.pam" | 60 | PAM_SRC_URI = "file://sudo.pam" |
10 | 61 | ||
11 | SRC_URI[sha256sum] = "558d10b9a1991fb3b9fa7fa7b07ec4405b7aefb5b3cb0b0871dbc81e3a88e558" | 62 | SRC_URI[sha256sum] = "ff607ea717072197738a78f778692cd6df9a7e3e404565f51de063ca27455d32" |
12 | 63 | ||
13 | DEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | 64 | DEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" |
14 | RDEPENDS:${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" | 65 | RDEPENDS:${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" |
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2025-7345.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2025-7345.patch new file mode 100644 index 0000000000..a8f23d3501 --- /dev/null +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2025-7345.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 4af78023ce7d3b5e3cec422a59bb4f48fa4f5886 Mon Sep 17 00:00:00 2001 | ||
2 | From: Matthias Clasen <mclasen@redhat.com> | ||
3 | Date: Fri, 11 Jul 2025 11:02:05 -0400 | ||
4 | Subject: [PATCH] jpeg: Be more careful with chunked icc data | ||
5 | |||
6 | We we inadvertendly trusting the sequence numbers not to lie. | ||
7 | If they do we would report a larger data size than we actually | ||
8 | allocated, leading to out of bounds memory access in base64 | ||
9 | encoding later on. | ||
10 | |||
11 | This has been assigned CVE-2025-7345. | ||
12 | |||
13 | Fixes: #249 | ||
14 | |||
15 | CVE: CVE-2025-7345 | ||
16 | |||
17 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/4af78023ce7d3b5e3cec422a59bb4f48fa4f5886] | ||
18 | |||
19 | Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | ||
20 | --- | ||
21 | gdk-pixbuf/io-jpeg.c | 8 ++++++-- | ||
22 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
23 | |||
24 | diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c | ||
25 | index 3841fc0..9ee1d21 100644 | ||
26 | --- a/gdk-pixbuf/io-jpeg.c | ||
27 | +++ b/gdk-pixbuf/io-jpeg.c | ||
28 | @@ -356,6 +356,7 @@ jpeg_parse_exif_app2_segment (JpegExifContext *context, jpeg_saved_marker_ptr ma | ||
29 | context->icc_profile = g_new (gchar, chunk_size); | ||
30 | /* copy the segment data to the profile space */ | ||
31 | memcpy (context->icc_profile, marker->data + 14, chunk_size); | ||
32 | + ret = TRUE; | ||
33 | goto out; | ||
34 | } | ||
35 | |||
36 | @@ -377,12 +378,15 @@ jpeg_parse_exif_app2_segment (JpegExifContext *context, jpeg_saved_marker_ptr ma | ||
37 | /* copy the segment data to the profile space */ | ||
38 | memcpy (context->icc_profile + offset, marker->data + 14, chunk_size); | ||
39 | |||
40 | - /* it's now this big plus the new data we've just copied */ | ||
41 | - context->icc_profile_size += chunk_size; | ||
42 | + context->icc_profile_size = MAX (context->icc_profile_size, offset + chunk_size); | ||
43 | |||
44 | /* success */ | ||
45 | ret = TRUE; | ||
46 | out: | ||
47 | + if (!ret) { | ||
48 | + g_free (context->icc_profile); | ||
49 | + context->icc_profile = NULL; | ||
50 | + } | ||
51 | return ret; | ||
52 | } | ||
53 | |||
54 | -- | ||
55 | 2.40.0 | ||
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.12.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.12.bb index 9f825a68ef..ff1c7a1fb2 100644 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.12.bb +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.12.bb | |||
@@ -20,6 +20,7 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ | |||
20 | file://run-ptest \ | 20 | file://run-ptest \ |
21 | file://fatal-loader.patch \ | 21 | file://fatal-loader.patch \ |
22 | file://0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch \ | 22 | file://0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch \ |
23 | file://CVE-2025-7345.patch \ | ||
23 | " | 24 | " |
24 | 25 | ||
25 | SRC_URI[sha256sum] = "b9505b3445b9a7e48ced34760c3bcb73e966df3ac94c95a148cb669ab748e3c7" | 26 | SRC_URI[sha256sum] = "b9505b3445b9a7e48ced34760c3bcb73e966df3ac94c95a148cb669ab748e3c7" |
diff --git a/scripts/oe-debuginfod b/scripts/oe-debuginfod index b525310225..60e51addfd 100755 --- a/scripts/oe-debuginfod +++ b/scripts/oe-debuginfod | |||
@@ -15,14 +15,29 @@ scriptpath.add_bitbake_lib_path() | |||
15 | 15 | ||
16 | import bb.tinfoil | 16 | import bb.tinfoil |
17 | import subprocess | 17 | import subprocess |
18 | import argparse | ||
18 | 19 | ||
19 | if __name__ == "__main__": | 20 | if __name__ == "__main__": |
21 | p = argparse.ArgumentParser() | ||
22 | p.add_argument("-d", action='store_true', \ | ||
23 | help="store debuginfod files in project sub-directory") | ||
24 | |||
25 | args = p.parse_args() | ||
26 | |||
20 | with bb.tinfoil.Tinfoil() as tinfoil: | 27 | with bb.tinfoil.Tinfoil() as tinfoil: |
21 | tinfoil.prepare(config_only=True) | 28 | tinfoil.prepare(config_only=True) |
22 | package_classes_var = "DEPLOY_DIR_" + tinfoil.config_data.getVar("PACKAGE_CLASSES").split()[0].replace("package_", "").upper() | 29 | package_classes_var = "DEPLOY_DIR_" + tinfoil.config_data.getVar("PACKAGE_CLASSES").split()[0].replace("package_", "").upper() |
23 | feed_dir = tinfoil.config_data.getVar(package_classes_var, expand=True) | 30 | feed_dir = tinfoil.config_data.getVar(package_classes_var, expand=True) |
24 | 31 | ||
32 | opts = [ '--verbose', '-R', '-U', feed_dir ] | ||
33 | |||
34 | if args.d: | ||
35 | fdir = os.path.join(os.getcwd(), 'oedid-files') | ||
36 | os.makedirs(fdir, exist_ok=True) | ||
37 | opts += [ '-d', os.path.join(fdir, 'did.sqlite') ] | ||
38 | |||
25 | subprocess.call(['bitbake', '-c', 'addto_recipe_sysroot', 'elfutils-native']) | 39 | subprocess.call(['bitbake', '-c', 'addto_recipe_sysroot', 'elfutils-native']) |
26 | 40 | ||
27 | subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod', '--verbose', '-R', '-U', feed_dir]) | 41 | subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod'] + opts) |
42 | # we should not get here | ||
28 | print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG:pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf") | 43 | print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG:pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf") |