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.
Bug 1214749 - libreport: harden against long path names
Summary: libreport: harden against long path names
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libreport
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jakub Filak
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 1211224 1214172
TreeView+ depends on / blocked
 
Reported: 2015-04-23 13:11 UTC by Florian Weimer
Modified: 2016-12-01 00:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-07 10:25:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2015-04-23 13:11:09 UTC
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).

Comment 2 Jakub Filak 2015-04-24 08:22:01 UTC
> Note that this code will likely go away if bug 1214745 is fixed ...

Thanks, we will go this way, so the static allocations will disappear.

Comment 3 Jakub Filak 2015-07-07 10:25:51 UTC
Closing as WONTFIX per comment #2 (the affected code will be completely replaced).


Note You need to log in before you can comment on or make changes to this bug.