-
Bug
-
Resolution: Done-Errata
-
Major
-
rhel-9.3.0
-
libeconf-0.4.1-4.el9
-
None
-
Low
-
rhel-sst-idm-sssd
-
ssg_idm
-
8
-
9
-
5
-
False
-
-
None
-
None
-
Pass
-
RegressionOnly
-
None
Problems
Error: RESOURCE_LEAK (CWE-772):
libeconf-0.4.1/lib/libeconf.c:312: alloc_arg: "econf_readDirsHistory" allocates memory that is stored into "key_files".
libeconf-0.4.1/lib/libeconf.c:321: leaked_storage: Variable "key_files" going out of scope leaks the storage it points to.
319| comment);
320| if (error != ECONF_SUCCESS)
321|-> return error;
322|
323| // Merge the list of acquired key_files into merged_file
Error: UNINIT (CWE-457):
libeconf-0.4.1/lib/libeconf.c:161: var_decl: Declaring variable "key_file" without initializer.
libeconf-0.4.1/lib/libeconf.c:247: uninit_use_in_call: Using uninitialized value "key_file" when calling "econf_freeFile".
245| key_files = calloc(*size, sizeof(econf_file));
246| if (*key_files == NULL)
Error: RESOURCE_LEAK (CWE-772):
libeconf-0.4.1/lib/libeconf.c:268: alloc_fn: Storage is returned from allocation function "combine_strings".
libeconf-0.4.1/lib/libeconf.c:268: var_assign: Assigning: "project_path" = storage returned from "combine_strings(default_dirs[i], project_name, '/')".
libeconf-0.4.1/lib/libeconf.c:271: leaked_storage: Variable "project_path" going out of scope leaks the storage it points to.
269| char suffix_d = malloc (strlen(suffix) + 4); / + strlen(".d/") */
270| if (suffix_d == NULL)
271|-> return ECONF_NOMEM;
272| cp = stpcpy(suffix_d, suffix);
273| stpcpy(cp, ".d");
Error: RESOURCE_LEAK (CWE-772):
libeconf-0.4.1/util/econftool.c:241: alloc_arg: "econf_readDirsHistory" allocates memory that is stored into "key_files".
libeconf-0.4.1/util/econftool.c:246: leaked_storage: Variable "key_files" going out of scope leaks the storage it points to.
244| if (econf_error)
248|
Error: RESOURCE_LEAK (CWE-772):
libeconf-0.4.1/util/econftool.c:241: alloc_arg: "econf_readDirsHistory" allocates memory that is stored into "key_files".
libeconf-0.4.1/util/econftool.c:246: leaked_storage: Variable "key_files" going out of scope leaks the storage it points to.
244| if (econf_error)
248|
Error: RESOURCE_LEAK (CWE-772):
libeconf-0.4.1/util/econftool.c:185: alloc_arg: "econf_getExtValue" allocates memory that is stored into "value".
libeconf-0.4.1/util/econftool.c:189: leaked_storage: Variable "value" going out of scope leaks the storage it points to.
187| fprintf(stderr, "%d: %s\n", econf_error, econf_errString(econf_error));
188| econf_free(keys);
189|-> return econf_error;
190| }
191| if (value != NULL) {
- links to
-
RHBA-2024:130536 libeconf bug fix and enhancement update