Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1437147 - Fix for thread cancellation of IdM functions incorrect in rhel-6.9.
Fix for thread cancellation of IdM functions incorrect in rhel-6.9.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glibc (Show other bugs)
6.9
All Linux
urgent Severity high
: rc
: ---
Assigned To: Carlos O'Donell
Sergey Kolosov
Vladimír Slávik
: ZStream
: 1394704 1437111 (view as bug list)
Depends On:
Blocks: 1504312 1437618 1507613
  Show dependency treegraph
 
Reported: 2017-03-29 11:51 EDT by Carlos O'Donell
Modified: 2018-06-19 01:15 EDT (History)
13 users (show)

See Also:
Fixed In Version: glibc-2.12-1.210.el6
Doc Type: Bug Fix
Doc Text:
Thread cancellation support for APIs depending on `/etc/hosts.conf` A defect in thread-cancellation support for the `setmntent()` function could cause the function to fail and return an error where it was expected to succeed. Consequently, programs that rely on `setmntent()` could fail to start. The `setmntent()` function has been fixed, and now works as expected. In addition, the `setttyent()` and `setnetgrent()` functions, and all APIs that rely on the `/etc/hosts.conf` file, have been enhanced to provide improved support for thread cancellation.
Story Points: ---
Clone Of:
: 1437618 (view as bug list)
Environment:
Last Closed: 2018-06-19 01:14:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1879 None None None 2018-06-19 01:15 EDT

  None (edit)
Description Carlos O'Donell 2017-03-29 11:51:43 EDT
The fix for bug 1012343:
https://bugzilla.redhat.com/show_bug.cgi?id=1012343

It results in an unterminated string being passed as a mode to fopen which results in the potential use of uninitialized data.

--- a/misc/mntent_r.c
+++ b/misc/mntent_r.c
@@ -40,10 +40,10 @@
 __setmntent (const char *file, const char *mode)
 {
   /* Extend the mode parameter with "c" to disable cancellation in the
-     I/O functions.  */
+     I/O functions and "e" to set FD_CLOEXEC.  */
   size_t modelen = strlen (mode);
   char newmode[modelen + 2];
-  memcpy (mempcpy (newmode, mode, modelen), "c", 2);
+  memcpy (mempcpy (newmode, mode, modelen), "ce", 2);
   FILE *result = fopen (file, newmode);

   if (result != NULL)

The newmode should be size modelen + 3 and the memcpy should copy 3 bytes.

An audit revealed that also needed are cancellation fixes for:

getttyent.c
files-netgrp.c
res_hconf.c

So we must fix those up also.

The fix for bug 952422 fixed the cancellation issue with getsysstats.c already.
Comment 2 Carlos O'Donell 2017-03-29 11:55:17 EDT
Fist reported here: https://blogs.oracle.com/wim/entry/oracle_linux_6_update_9

(Via bug 1012343 comment 21.)
Comment 3 Carlos O'Donell 2017-03-29 11:56:05 EDT
*** Bug 1437111 has been marked as a duplicate of this bug. ***
Comment 5 Carlos O'Donell 2017-03-29 13:44:52 EDT
Fixes complete and undergoing internal review.
Comment 8 Carlos O'Donell 2017-03-29 21:34:09 EDT
(In reply to Carlos O'Donell from comment #0)
> Contains a defect that results in a 1-byte buffer overflow.

This statement is incorrect. It results in an unterminated string being passed as a mode to fopen which results in the potential use of uninitialized data.
Comment 16 Florian Weimer 2017-04-03 04:42:43 EDT
*** Bug 1394704 has been marked as a duplicate of this bug. ***
Comment 22 errata-xmlrpc 2018-06-19 01:14:29 EDT
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://access.redhat.com/errata/RHSA-2018:1879

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