Bug 1327712

Summary: Missing suppression for setsourcefilter call
Product: [Fedora] Fedora Reporter: Robert Hancock <robert.hancock>
Component: valgrindAssignee: Mark Wielaard <mjw>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dodji, jakub, mjw
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 11:54:15 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:

Description Robert Hancock 2016-04-15 17:17:37 UTC
Description of problem:
Valgrind produces warnings for any program that uses glibc's setsourcefilter function:

==16799== Syscall param socketcall.setsockopt(optval) points to uninitialised byte(s)
==16799==    at 0x9024BAA: setsockopt (in /usr/lib64/libc-2.22.so)
==16799==    by 0x903FFEF: setsourcefilter (in /usr/lib64/libc-2.22.so)

...

==16799==  Address 0xffeffc814 is on thread 1's stack
==16799==  in frame #1, created by setsourcefilter (???:)
==16799==  Uninitialised value was created by a stack allocation
==16799==    at 0x903FF7C: setsourcefilter (in /usr/lib64/libc-2.22.so)

The setsourcefilter function allocates space on the stack for a struct group_filter, but only initializes as much of the gf_group member as the user provides as the length of the socket address. If the length is less than the size of sockaddr_storage (as it is for sockaddr_in) then part of this struct member will be uninitialized. Valgrind then complains when the buffer containing this structure is passed to the kernel in the MCAST_MSFILTER setsockopt call.

A Valgrind suppression should likely be added for this warning.

Version-Release number of selected component (if applicable):
valgrind-3.11.0-18.fc23.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Run Valgrind on a program that calls setsourcefilter
2.
3.

Actual results:
Valgrind warnings from glibc code

Expected results:
No warnings from glibc

Additional info:

Comment 1 Mark Wielaard 2016-04-15 19:12:30 UTC
(In reply to Robert Hancock from comment #0)
> Description of problem:
> Valgrind produces warnings for any program that uses glibc's setsourcefilter
> function:
> [...]
> Steps to Reproduce:
> 1. Run Valgrind on a program that calls setsourcefilter

Do you happen to have an example program that does?
setsourcefilter isn't documented in the GNU GLIBC Manual, nor on man7.org.

Comment 2 Robert Hancock 2016-04-15 20:30:23 UTC
It's documented in RFC 3678: https://www.ietf.org/rfc/rfc3678.txt

It is a bit strange that glibc doesn't seem to provide any documentation for it. We have some internally developed software that uses it, I'm not sure if anything included in Fedora actually does or not.

Comment 3 Fedora End Of Life 2016-11-25 07:22:21 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Mark Wielaard 2016-11-25 08:43:01 UTC
A source example would be really helpful.

Comment 5 Fedora End Of Life 2017-02-28 09:57:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 6 Fedora End Of Life 2018-05-03 08:42:10 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2018-05-29 11:54:15 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.