Bug 554886 - hal-disable-polling --device /dev/<symlink> dies horrid death
Summary: hal-disable-polling --device /dev/<symlink> dies horrid death
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: hal
Version: 13
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 577526 582761 611136 639497 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-12 22:05 UTC by Valdis Kletnieks
Modified: 2011-06-27 14:47 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 710920 (view as bug list)
Environment:
Last Closed: 2011-06-27 14:47:28 UTC


Attachments (Terms of Use)
Proposed patch (1.29 KB, patch)
2010-03-09 12:08 UTC, Adam Tkac
no flags Details | Diff

Description Valdis Kletnieks 2010-01-12 22:05:27 UTC
Description of problem:

# hal-disable-polling --device /dev/cdrom
*** buffer overflow detected ***: hal-disable-polling terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x34478fb557]
/lib64/libc.so.6[0x34478f94c0]
/lib64/libc.so.6[0x34478f9b1b]
hal-disable-polling[0x40148b]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x344781ed2d]
hal-disable-polling[0x400e49]
======= Memory map: ========
00400000-00403000 r-xp 00000000 fe:06 20575                              /usr/bin/hal-disable-polling
00602000-00603000 rw-p 00002000 fe:06 20575                              /usr/bin/hal-disable-polling
01d4f000-01d70000 rw-p 00000000 00:00 0                                  [heap]
3447400000-3447420000 r-xp 00000000 fe:03 265                            /lib64/ld-2.11.90.so
344761f000-3447620000 r--p 0001f000 fe:03 265                            /lib64/ld-2.11.90.so
3447620000-3447621000 rw-p 00020000 fe:03 265                            /lib64/ld-2.11.90.so
3447621000-3447622000 rw-p 00000000 00:00 0 
3447800000-3447978000 r-xp 00000000 fe:03 273                            /lib64/libc-2.11.90.so
3447978000-3447b78000 ---p 00178000 fe:03 273                            /lib64/libc-2.11.90.so
3447b78000-3447b7c000 r--p 00178000 fe:03 273                            /lib64/libc-2.11.90.so
3447b7c000-3447b7d000 rw-p 0017c000 fe:03 273                            /lib64/libc-2.11.90.so
3447b7d000-3447b82000 rw-p 00000000 00:00 0 
3448000000-3448018000 r-xp 00000000 fe:03 405                            /lib64/libpthread-2.11.90.so
3448018000-3448217000 ---p 00018000 fe:03 405                            /lib64/libpthread-2.11.90.so
3448217000-3448218000 r--p 00017000 fe:03 405                            /lib64/libpthread-2.11.90.so
3448218000-3448219000 rw-p 00018000 fe:03 405                            /lib64/libpthread-2.11.90.so
3448219000-344821d000 rw-p 00000000 00:00 0 
3448800000-3448807000 r-xp 00000000 fe:03 424                            /lib64/librt-2.11.90.so
3448807000-3448a07000 ---p 00007000 fe:03 424                            /lib64/librt-2.11.90.so
3448a07000-3448a08000 r--p 00007000 fe:03 424                            /lib64/librt-2.11.90.so
3448a08000-3448a09000 rw-p 00008000 fe:03 424                            /lib64/librt-2.11.90.so
344dc00000-344dc04000 r-xp 00000000 fe:03 13769                          /lib64/libcap-ng.so.0.0.0
344dc04000-344de03000 ---p 00004000 fe:03 13769                          /lib64/libcap-ng.so.0.0.0
344de03000-344de04000 r--p 00003000 fe:03 13769                          /lib64/libcap-ng.so.0.0.0
344de04000-344de05000 rw-p 00004000 fe:03 13769                          /lib64/libcap-ng.so.0.0.0
3b3f000000-3b3f03f000 r-xp 00000000 fe:03 6398                           /lib64/libdbus-1.so.3.4.0
3b3f03f000-3b3f23f000 ---p 0003f000 fe:03 6398                           /lib64/libdbus-1.so.3.4.0
3b3f23f000-3b3f240000 r--p 0003f000 fe:03 6398                           /lib64/libdbus-1.so.3.4.0
3b3f240000-3b3f241000 rw-p 00040000 fe:03 6398                           /lib64/libdbus-1.so.3.4.0
3b41c00000-3b41c10000 r-xp 00000000 fe:06 12720                          /usr/lib64/libhal.so.1.0.0
3b41c10000-3b41e0f000 ---p 00010000 fe:06 12720                          /usr/lib64/libhal.so.1.0.0
3b41e0f000-3b41e10000 rw-p 0000f000 fe:06 12720                          /usr/lib64/libhal.so.1.0.0
3d39c00000-3d39ce5000 r-xp 00000000 fe:03 3617                           /lib64/libglib-2.0.so.0.2300.1
3d39ce5000-3d39ee4000 ---p 000e5000 fe:03 3617                           /lib64/libglib-2.0.so.0.2300.1
3d39ee4000-3d39ee5000 rw-p 000e4000 fe:03 3617                           /lib64/libglib-2.0.so.0.2300.1
3d39ee5000-3d39ee6000 rw-p 00000000 00:00 0 
3d3d000000-3d3d016000 r-xp 00000000 fe:03 924                            /lib64/libgcc_s-4.4.2-20091222.so.1
3d3d016000-3d3d215000 ---p 00016000 fe:03 924                            /lib64/libgcc_s-4.4.2-20091222.so.1
3d3d215000-3d3d216000 rw-p 00015000 fe:03 924                            /lib64/libgcc_s-4.4.2-20091222.so.1
7fa25335c000-7fa253361000 rw-p 00000000 00:00 0 
7fa253381000-7fa253382000 rw-p 00000000 00:00 0 
7fff7530c000-7fff75321000 rw-p 00000000 00:00 0                          [stack]
7fff753ff000-7fff75400000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted

Apparently it gets indigestion on the fact /dev/cdrom is a symlink to /dev/sr0 - "--device /dev/sr0" works fine.

Version-Release number of selected component (if applicable):
hal-0.5.14-1.fc13.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Adam Tkac 2010-03-09 12:08:03 UTC
Created attachment 398772 [details]
Proposed patch

Problem is quite simple. Second realpath(3) argument is too short. It should be at least PATH_MAX bytes (which is currently 4096 B), not HAL_PATH_MAX (512 B). Patch fixes this issue and, I believe, is better than original approach with fixed-length array.

Comment 2 Bug Zapper 2010-03-15 13:52:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

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

Comment 3 Niels de Vos 2010-05-31 13:23:45 UTC
Confirming the same bug with Fedora 13 and hal-0.5.14-3.fc13.x86_64.

powertop advised me to execute that command, I expect lots of people will hit the same bug :-/

The workaround as mentioned in the opening comment works for me too:

# hal-disable-polling --device $(readlink -f /dev/cdrom)

Comment 4 Paul Jenner 2010-07-03 22:13:22 UTC
*** Bug 611136 has been marked as a duplicate of this bug. ***

Comment 5 Jan Vcelak 2010-07-13 16:42:21 UTC
*** Bug 582761 has been marked as a duplicate of this bug. ***

Comment 6 Jan Vcelak 2010-07-13 16:49:28 UTC
The same problem on F13 and Rawhide.

Please, can you fix this bug ASAP? This makes profile switching in tuned to crash.

Comment 8 Matthias Runge 2010-09-10 18:48:56 UTC
I can confirm this problem for recent F14
hal-0.5.14-4.fc14.i686
naming the device by its correct name (not the symlink) hal-disable-polling seems to work fine.

Comment 9 MartinG 2010-09-29 19:40:58 UTC
Another me too:
# hal-disable-polling --enable-polling --device /dev/scd0
*** buffer overflow detected ***: hal-disable-polling terminated
Aborted (core dumped)

Workaround:
# hal-disable-polling --enable-polling --device $(readlink -f /dev/scd0)
Polling for drive /dev/sr0 have been enabled. The fdi file deleted was
  /etc/hal/fdi/information/media-check-disable-storage_model_DVDRAM_GSA_U20N.fdi


hal-0.5.14-5.fc15.x86_64

Fedora Rawhide.

Comment 10 Mihai Vintila 2010-10-06 12:28:37 UTC
*** Bug 639497 has been marked as a duplicate of this bug. ***

Comment 11 Bug Zapper 2011-06-02 16:54:25 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  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 '13'.

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 13'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 13 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 12 Niels de Vos 2011-06-05 11:32:30 UTC
Fedora 16 will very likely not contain hal anymore and therefore will obsolete this bug:
- https://fedoraproject.org/wiki/Features/HalRemoval

Comment 13 Pavel Alexeev 2011-06-06 09:11:42 UTC
*** Bug 577526 has been marked as a duplicate of this bug. ***

Comment 14 Bug Zapper 2011-06-27 14:47:28 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 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.


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