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.
The debug version of tcmalloc opens a hard-coded file in /tmp. Arguably, this is not a vulnerability because it just affects debugging, but we should still fix this before shipping gperftools.
// Return the file descriptor we're writing a log to
static int TraceFd() {
static int trace_fd = -1;
if (trace_fd == -1) { // Open the trace file on the first call
trace_fd = open("/tmp/google.alloc", O_CREAT|O_TRUNC|O_WRONLY, 0666);
if (trace_fd == -1) {
trace_fd = 2;
TracePrintf(trace_fd,
"Can't open /tmp/google.alloc. Logging to stderr.\n");
}
…
I checked the gperftools/gperftools-2.4/src/debugallocation.cc in both gperftools-2.4-1 and gperftools-2.4-2.
The output is the same as comment 0:
// Return the file descriptor we're writing a log to
955 static int TraceFd() {
956 static int trace_fd = -1;
957 if (trace_fd == -1) { // Open the trace file on the first call
958 trace_fd = open("/tmp/google.alloc", O_CREAT|O_TRUNC|O_WRONLY, 0666);
959 if (trace_fd == -1) {
960 trace_fd = 2;
961 TracePrintf(trace_fd,
962 "Can't open /tmp/google.alloc. Logging to stderr.\n");
963 }
...
Is it the correct results?
> The original reported problem still exists if the TCMALLOC_TRACE_FILE
> environment variable is not set. I find this change rather puzzling.
The point of the change is just to let multiple users do their own debugging without stumbling on someone else's /tmp/google.alloc, by either specifying TCMALLOC_TRACE_FILE or falling back to stderr. I didn't treat it as a vulnerability, just as a bug that occurs whenever /tmp/google.alloc exists and is owned by someone else.
According to comment10, comemnt11 and comment14. Set this issue as verified. Please let me know if need further testing from kvm qe side.
Best Regards,
Junyi
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHEA-2015-2293.html
The debug version of tcmalloc opens a hard-coded file in /tmp. Arguably, this is not a vulnerability because it just affects debugging, but we should still fix this before shipping gperftools. // Return the file descriptor we're writing a log to static int TraceFd() { static int trace_fd = -1; if (trace_fd == -1) { // Open the trace file on the first call trace_fd = open("/tmp/google.alloc", O_CREAT|O_TRUNC|O_WRONLY, 0666); if (trace_fd == -1) { trace_fd = 2; TracePrintf(trace_fd, "Can't open /tmp/google.alloc. Logging to stderr.\n"); } …