Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
From d73777c2c3566fb2647727bb56d9a2295b81669b Mon Sep 17 00:00:00 2001
|
||||
From: Joachim Wiberg <troglobit@gmail.com>
|
||||
Date: Fri, 2 Sep 2022 16:12:46 +0200
|
||||
Subject: [PATCH] Fix #163: unterminated username used with getpwnam()
|
||||
|
||||
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
|
||||
|
||||
CVE: CVE-2022-40320
|
||||
Upstream: https://github.com/libconfuse/libconfuse/commit/d73777c2c3566fb2647727bb56d9a2295b81669b
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
src/confuse.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/confuse.c b/src/confuse.c
|
||||
index 6d1fdbd..05566b5 100644
|
||||
--- a/src/confuse.c
|
||||
+++ b/src/confuse.c
|
||||
@@ -1894,18 +1894,20 @@ DLLIMPORT char *cfg_tilde_expand(const char *filename)
|
||||
passwd = getpwuid(geteuid());
|
||||
file = filename + 1;
|
||||
} else {
|
||||
- /* ~user or ~user/path */
|
||||
- char *user;
|
||||
+ char *user; /* ~user or ~user/path */
|
||||
+ size_t len;
|
||||
|
||||
file = strchr(filename, '/');
|
||||
if (file == 0)
|
||||
file = filename + strlen(filename);
|
||||
|
||||
- user = malloc(file - filename);
|
||||
+ len = file - filename - 1;
|
||||
+ user = malloc(len + 1);
|
||||
if (!user)
|
||||
return NULL;
|
||||
|
||||
- strncpy(user, filename + 1, file - filename - 1);
|
||||
+ strncpy(user, &filename[1], len);
|
||||
+ user[len] = 0;
|
||||
passwd = getpwnam(user);
|
||||
free(user);
|
||||
}
|
||||
11
package/libconfuse/Config.in
Normal file
11
package/libconfuse/Config.in
Normal file
@@ -0,0 +1,11 @@
|
||||
config BR2_PACKAGE_LIBCONFUSE
|
||||
bool "libconfuse"
|
||||
help
|
||||
LibConfuse is a configuration file parser library written in
|
||||
C. It supports sections and (lists of) values (strings,
|
||||
integers, floats, booleans or other sections), as well as some
|
||||
other features (such as single/double-quoted strings,
|
||||
environment variable expansion, functions and nested include
|
||||
statements.
|
||||
|
||||
https://github.com/libconfuse/libconfuse
|
||||
5
package/libconfuse/libconfuse.hash
Normal file
5
package/libconfuse/libconfuse.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# From https://github.com/martinh/libconfuse/releases/download/v3.3/confuse-3.3.tar.xz.md5
|
||||
md5 a183cef2cecdd3783436ff8de500d274 confuse-3.3.tar.xz
|
||||
# Locally computed
|
||||
sha256 1dd50a0320e135a55025b23fcdbb3f0a81913b6d0b0a9df8cc2fdf3b3dc67010 confuse-3.3.tar.xz
|
||||
sha256 dc3ff4b62f851dd2e94a151061ffeb7d28ddfc880a442068dc5283dbaa927306 LICENSE
|
||||
21
package/libconfuse/libconfuse.mk
Normal file
21
package/libconfuse/libconfuse.mk
Normal file
@@ -0,0 +1,21 @@
|
||||
################################################################################
|
||||
#
|
||||
# libconfuse
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBCONFUSE_VERSION = 3.3
|
||||
LIBCONFUSE_SOURCE = confuse-$(LIBCONFUSE_VERSION).tar.xz
|
||||
LIBCONFUSE_SITE = https://github.com/libconfuse/libconfuse/releases/download/v$(LIBCONFUSE_VERSION)
|
||||
LIBCONFUSE_INSTALL_STAGING = YES
|
||||
LIBCONFUSE_CONF_OPTS = --disable-rpath
|
||||
LIBCONFUSE_LICENSE = ISC
|
||||
LIBCONFUSE_LICENSE_FILES = LICENSE
|
||||
LIBCONFUSE_CPE_ID_VALID = YES
|
||||
LIBCONFUSE_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
|
||||
|
||||
# 0001-Fix-163-unterminated-username-used-with-getpwnam.patch
|
||||
LIBCONFUSE_IGNORE_CVES += CVE-2022-40320
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user