Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
In src/lib/dump_dir.c, there are several places where names are allocated on the stack, either as fixed-sized buffers or with VLAs:
static const char *dd_check(struct dump_dir *dd)
{
unsigned dirname_len = strlen(dd->dd_dirname);
char filename_buf[FILENAME_MAX+1];
strcpy(filename_buf, dd->dd_dirname);
strcpy(filename_buf + dirname_len, "/"FILENAME_TIME);
static int dd_lock(struct dump_dir *dd, unsigned sleep_usec, int flags)
{
…
unsigned dirname_len = strlen(dd->dd_dirname);
char lock_buf[dirname_len + sizeof("/.lock")];
strcpy(lock_buf, dd->dd_dirname);
strcpy(lock_buf + dirname_len, "/.lock");
These should be changed to use heap allocations instead, perhaps with the help of concat_path_file.
Note that this code will likely go away if bug 1214745 is fixed because there is less need for path name construction (in this context, concat_path_file is pretty much an anti-pattern, except if used in error messages).
In src/lib/dump_dir.c, there are several places where names are allocated on the stack, either as fixed-sized buffers or with VLAs: static const char *dd_check(struct dump_dir *dd) { unsigned dirname_len = strlen(dd->dd_dirname); char filename_buf[FILENAME_MAX+1]; strcpy(filename_buf, dd->dd_dirname); strcpy(filename_buf + dirname_len, "/"FILENAME_TIME); static int dd_lock(struct dump_dir *dd, unsigned sleep_usec, int flags) { … unsigned dirname_len = strlen(dd->dd_dirname); char lock_buf[dirname_len + sizeof("/.lock")]; strcpy(lock_buf, dd->dd_dirname); strcpy(lock_buf + dirname_len, "/.lock"); These should be changed to use heap allocations instead, perhaps with the help of concat_path_file. Note that this code will likely go away if bug 1214745 is fixed because there is less need for path name construction (in this context, concat_path_file is pretty much an anti-pattern, except if used in error messages).