Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
From af2aa88ab37fc48167d8c5e43b1770a4ba2ff403 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Bokovoy <abbra@users.noreply.github.com>
|
||||
Date: Sun, 30 Mar 2025 12:27:04 +0300
|
||||
Subject: [PATCH] CVE-2025-2588: return _REG_ENOSYS if no specific error was
|
||||
set yet parse_regexp failed (#854)
|
||||
|
||||
parse_regexp() supposed to set an error on the parser state in case of a
|
||||
failure. If no specific error was set, return _REG_ENOSYS to indicate a
|
||||
generic failure.
|
||||
|
||||
Fixes: https://github.com/hercules-team/augeas/issues/671
|
||||
Fixes: https://github.com/hercules-team/augeas/issues/778
|
||||
Fixes: https://github.com/hercules-team/augeas/issues/852
|
||||
|
||||
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
|
||||
|
||||
Upstream: https://github.com/hercules-team/augeas/commit/af2aa88ab37fc48167d8c5e43b1770a4ba2ff403
|
||||
CVE: CVE-2025-2588
|
||||
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
|
||||
|
||||
---
|
||||
src/fa.c | 2 ++
|
||||
src/fa.h | 3 ++-
|
||||
tests/fatest.c | 6 ++++++
|
||||
3 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/fa.c b/src/fa.c
|
||||
index 66ac70784..4de5675b9 100644
|
||||
--- a/src/fa.c
|
||||
+++ b/src/fa.c
|
||||
@@ -3550,6 +3550,8 @@ static struct re *parse_regexp(struct re_parse *parse) {
|
||||
return re;
|
||||
|
||||
error:
|
||||
+ if (re == NULL && parse->error == REG_NOERROR)
|
||||
+ parse->error = _REG_ENOSYS;
|
||||
re_unref(re);
|
||||
return NULL;
|
||||
}
|
||||
diff --git a/src/fa.h b/src/fa.h
|
||||
index 1fd754ad0..89c9b17e9 100644
|
||||
--- a/src/fa.h
|
||||
+++ b/src/fa.h
|
||||
@@ -81,7 +81,8 @@ extern int fa_minimization_algorithm;
|
||||
*
|
||||
* On success, FA points to the newly allocated automaton constructed for
|
||||
* RE, and the function returns REG_NOERROR. Otherwise, FA is NULL, and the
|
||||
- * return value indicates the error.
|
||||
+ * return value indicates the error. Special value _REG_ENOSYS indicates
|
||||
+ * fa_compile() couldn't identify the syntax issue with regexp.
|
||||
*
|
||||
* The FA is case sensitive. Call FA_NOCASE to switch it to
|
||||
* case-insensitive.
|
||||
diff --git a/tests/fatest.c b/tests/fatest.c
|
||||
index 0c9ca7696..6717af8f4 100644
|
||||
--- a/tests/fatest.c
|
||||
+++ b/tests/fatest.c
|
||||
@@ -589,6 +589,7 @@ static void testExpandNoCase(CuTest *tc) {
|
||||
const char *p1 = "aB";
|
||||
const char *p2 = "[a-cUV]";
|
||||
const char *p3 = "[^a-z]";
|
||||
+ const char *wrong_regexp = "{&.{";
|
||||
char *s;
|
||||
size_t len;
|
||||
int r;
|
||||
@@ -607,6 +608,11 @@ static void testExpandNoCase(CuTest *tc) {
|
||||
CuAssertIntEquals(tc, 0, r);
|
||||
CuAssertStrEquals(tc, "[^A-Za-z]", s);
|
||||
free(s);
|
||||
+
|
||||
+ /* Test that fa_expand_nocase does return _REG_ENOSYS */
|
||||
+ r = fa_expand_nocase(wrong_regexp, strlen(wrong_regexp), &s, &len);
|
||||
+ CuAssertIntEquals(tc, _REG_ENOSYS, r);
|
||||
+ free(s);
|
||||
}
|
||||
|
||||
static void testNoCaseComplement(CuTest *tc) {
|
||||
20
package/augeas/Config.in
Normal file
20
package/augeas/Config.in
Normal file
@@ -0,0 +1,20 @@
|
||||
config BR2_PACKAGE_AUGEAS
|
||||
bool "augeas"
|
||||
# ARC toolchain issue:
|
||||
# https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/108
|
||||
depends on !BR2_arc
|
||||
depends on BR2_USE_WCHAR
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
select BR2_PACKAGE_READLINE
|
||||
help
|
||||
Augeas is a configuration editing tool. It parses
|
||||
configuration files in their native formats and transforms
|
||||
them into a tree. Configuration changes are made by
|
||||
manipulating this tree and saving it back into native config
|
||||
files.
|
||||
|
||||
http://augeas.net
|
||||
|
||||
comment "augeas needs a toolchain w/ wchar"
|
||||
depends on !BR2_arc
|
||||
depends on !BR2_USE_WCHAR
|
||||
3
package/augeas/augeas.hash
Normal file
3
package/augeas/augeas.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 368bfdd782e4b9c7163baadd621359c82b162734864b667051ff6bcb57b9edff augeas-1.14.1.tar.gz
|
||||
sha256 ca0061fc1381a3ab242310e4b3f56389f28e3d460eb2fd822ed7a21c6f030532 COPYING
|
||||
26
package/augeas/augeas.mk
Normal file
26
package/augeas/augeas.mk
Normal file
@@ -0,0 +1,26 @@
|
||||
################################################################################
|
||||
#
|
||||
# augeas
|
||||
#
|
||||
################################################################################
|
||||
|
||||
AUGEAS_VERSION = 1.14.1
|
||||
AUGEAS_SITE = https://github.com/hercules-team/augeas/releases/download/release-$(AUGEAS_VERSION)
|
||||
AUGEAS_INSTALL_STAGING = YES
|
||||
AUGEAS_LICENSE = LGPL-2.1+
|
||||
AUGEAS_LICENSE_FILES = COPYING
|
||||
AUGEAS_CPE_ID_VENDOR = augeas
|
||||
AUGEAS_DEPENDENCIES = host-pkgconf readline libxml2
|
||||
|
||||
AUGEAS_CONF_OPTS = --disable-gnulib-tests
|
||||
|
||||
# 0001-CVE-2025-2588-return-_REG_ENOSYS-if-no-specific-error-was-set-yet-parse_regexp-failed.patch
|
||||
AUGEAS_IGNORE_CVES += CVE-2025-2588
|
||||
|
||||
# Remove the test lenses which occupy about 1.4 MB on the target
|
||||
define AUGEAS_REMOVE_TEST_LENSES
|
||||
rm -rf $(TARGET_DIR)/usr/share/augeas/lenses/dist/tests
|
||||
endef
|
||||
AUGEAS_POST_INSTALL_TARGET_HOOKS += AUGEAS_REMOVE_TEST_LENSES
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user