Bug 464447

Summary: valgrind /usr/bin/bluetooth-wizard dies with permission denied in mmap.
Product: [Fedora] Fedora Reporter: Ralph Loader <suckfish>
Component: valgrindAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: jakub
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-18 06:27:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ralph Loader 2008-09-29 05:44:39 UTC
Running valgrind /usr/bin/bluetooth-wizard, I get:

valgrind: mmap(0x0, 45056) failed in UME with error 13 (Permission denied).

and the program dies.

This appears to be a problem with valgrind as (1) the error message mentions valgrind, (b) the bluetooth-wizard starts up properly when not run under valgrind.

$ rpm -q valgrind bluez-gnome
valgrind-3.3.0-3.x86_64
bluez-gnome-1.3-1.fc10.x86_64

$ uname -a
Linux i.geek.nz 2.6.27-0.352.rc7.git1.fc10.x86_64 #1 SMP Tue Sep 23 21:13:29 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

Comment 1 Ralph Loader 2008-09-29 06:08:07 UTC
Hacking the source code to hardwire the passcode, got the device connected OK.

So bug is that bluetooth-wizard assumes it can always choose an arbitrary passcode.

It can't; it needs to let the user input the passcode, as it may be hardwired into the device.

I guess this bug should go upstream, but I can't find an upstream bugzilla.  Any hints/  the www.bluez.org website doesn't list any contacts for the user-space stuff.

Comment 2 Ralph Loader 2008-09-29 06:16:31 UTC
Sorry previous comment is on wrong bug!

Comment 3 Jakub Jelinek 2008-10-14 12:23:34 UTC
Do you get any SELinux auditing messages?  If the program is say requiring text relocations, it might be marked as *textrel_t SELinux context, but when you run it under valgrind, valgrind obviously doesn't (and shouldn't) have that context.

Comment 4 Ralph Loader 2008-10-15 06:55:38 UTC
Nope, no auditing messages.  Happens even when booting with selinux=0.

Comment 5 Ralph Loader 2008-10-15 07:32:21 UTC
Doing an 'strace valgrind bluetooth-wizard', I think valgind is doing something stupid:

mmap(NULL, 49152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = -1 EACCES 

MAP_FIXED at address NULL?

[The fd is /usr/bin/bluetooth-manager, opened O_RDONLY].

Writing a test program, indeed mapping at NULL with map-fixed fails with eperm.

Comment 6 Bug Zapper 2008-11-26 03:15:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2009-11-18 08:26:31 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  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 WONTFIX if it remains open with a Fedora 
'version' of '10'.

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 prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Bug Zapper 2009-12-18 06:27:02 UTC
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 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.

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