Bug 1451308
Summary: | glibc: Fix valgrind reporting with check_pf when there is no ipv6 interface | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Deepu K S <dkochuka> |
Component: | glibc | Assignee: | Arjun Shankar <ashankar> |
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-tools-bugs |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | ashankar, bfinger, bgollahe, codonell, cww, dkochuka, fweimer, glibc-bugzilla, jwright, mnewsome, pfrankli, skolosov |
Target Milestone: | rc | Keywords: | Patch |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | glibc-2.17-296.el7 | Doc Type: | Bug Fix |
Doc Text: |
Cause: When running on a system with IPv6 disabled, a pointer used internally by the getaddrinfo function was deallocated and assigned the address of a statically allocated structure instead.
Consequence: The runtime incorrectly attempted to deallocate this statically allocated memory at program exit. This led to a crash at program exit and/or an "invalid free" error when run under `valgrind'.
Fix: getaddrinfo was fixed so that at program exit, it now only deallocates this memory if it is dynamically allocated.
Result: Programs using getaddrinfo running on systems with IPv6 disabled no longer crash and/or show "invalid free" errors when run under `valgrind'.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2020-03-31 19:08:29 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1594286, 1710258 |
Description
Deepu K S
2017-05-16 11:26:58 UTC
I looked at the upstream fix and it seems wrong. After the fix, we need leak the memory instead if the cache pointer was allocated on the heap. We should remove the statically allocate structure and always allocate it on the heap. Things have changed since the code was written. Today, (unused) IPv6 interfaces are the default, and the static allocation just wastes RSS. Verified, the bug reproduced in glibc-2.17-295.el7 and didn't in glibc-2.17-296.el7. 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/RHBA-2020:0989 |