xfce4-sensors doesn't start with hddtemp + suid

Bug #344015 reported by Bremm
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
xfce4-sensors-plugin (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

$ LANG=C xfce4-sensors

"hddtemp" was not executed correctly, although it is executable. This is most probably due to the disks requiring root privileges to read their temperatures, and "hddtemp" not being setuid root.

An easy but dirty solution is to run "chmod u+s /usr/sbin/hddtemp" as root user and restart this plugin or its panel.

Calling "/usr/sbin/hddtemp -n -q /dev/sda" gave the following error:
/dev/sda: open: Permission denied

with a return value of 256.

OK, so we set suid bit to hddtemp:

$ sudo chmod u+s /usr/sbin/hddtemp

$ xfce4-sensors

*** glibc detected *** xfce4-sensors: free(): invalid pointer: 0x0000000002352c90 ***
======= Backtrace: =========
/lib/libc.so.6[0x3d22477cb8]
/lib/libc.so.6(cfree+0x76)[0x3d2247a276]
/usr/lib/xfce4/modules/libxfce4sensors.so.1(get_hddtemp_value+0x125)[0x3d21a06b35]
/usr/lib/xfce4/modules/libxfce4sensors.so.1(sensor_get_value+0x4c)[0x3d21a03eec]
/usr/lib/xfce4/modules/libxfce4sensors.so.1(fill_gtkTreeStore+0xc8)[0x3d21a05c08]
/usr/lib/xfce4/modules/libxfce4sensors.so.1(init_widgets+0xc4)[0x3d21a05e14]
xfce4-sensors[0x40192f]
xfce4-sensors[0x40185e]
/lib/libc.so.6(__libc_start_main+0xe6)[0x3d2241e5a6]
xfce4-sensors[0x4015e9]
======= Memory map: ========
00400000-00403000 r-xp 00000000 08:01 494837 /usr/bin/xfce4-sensors
00602000-00603000 r--p 00002000 08:01 494837 /usr/bin/xfce4-sensors
00603000-00604000 rw-p 00003000 08:01 494837 /usr/bin/xfce4-sensors
02212000-0237a000 rw-p 02212000 00:00 0 [heap]
3d21200000-3d21220000 r-xp 00000000 08:01 33300 /lib/ld-2.9.so
3d2141f000-3d21420000 r--p 0001f000 08:01 33300 /lib/ld-2.9.so
3d21420000-3d21421000 rw-p 00020000 08:01 33300 /lib/ld-2.9.so
3d21600000-3d2160d000 r-xp 00000000 08:01 216244 /usr/lib/libsensors.so.4.0.2
3d2160d000-3d2180d000 ---p 0000d000 08:01 216244 /usr/lib/libsensors.so.4.0.2
3d2180d000-3d2180e000 r--p 0000d000 08:01 216244 /usr/lib/libsensors.so.4.0.2
3d2180e000-3d2180f000 rw-p 0000e000 08:01 216244 /usr/lib/libsensors.so.4.0.2
3d21a00000-3d21a0a000 r-xp 00000000 08:01 517286 /usr/lib/xfce4/modules/libxfce4sensors.so.1.0.0
3d21a0a000-3d21c09000 ---p 0000a000 08:01 517286 /usr/lib/xfce4/modules/libxfce4sensors.so.1.0.0
3d21c09000-3d21c0a000 r--p 00009000 08:01 517286 /usr/lib/xfce4/modules/libxfce4sensors.so.1.0.0
3d21c0a000-3d21c0b000 rw-p 0000a000 08:01 517286 /usr/lib/xfce4/modules/libxfce4sensors.so.1.0.0
3d22000000-3d2200f000 r-xp 00000000 08:01 519031 /usr/lib/libxfce4util.so.4.1.1
3d2200f000-3d2220e000 ---p 0000f000 08:01 519031 /usr/lib/libxfce4util.so.4.1.1
3d2220e000-3d2220f000 r--p 0000e000 08:01 519031 /usr/lib/libxfce4util.so.4.1.1
3d2220f000-3d22210000 rw-p 0000f000 08:01 519031 /usr/lib/libxfce4util.so.4.1.1
3d22210000-3d22211000 rw-p 3d22210000 00:00 0
3d22400000-3d22568000 r-xp 00000000 08:01 215588 /lib/libc-2.9.so
3d22568000-3d22768000 ---p 00168000 08:01 215588 /lib/libc-2.9.so
3d22768000-3d2276c000 r--p 00168000 08:01 215588 /lib/libc-2.9.so
3d2276c000-3d2276d000 rw-p 0016c000 08:01 215588 /lib/libc-2.9.so
3d2276d000-3d22772000 rw-p 3d2276d000 00:00 0
3d22800000-3d22802000 r-xp 00000000 08:01 443256 /lib/libdl-2.9.so
3d22802000-3d22a02000 ---p 00002000 08:01 443256 /lib/libdl-2.9.so
3d22a02000-3d22a03000 r--p 00002000 08:01 443256 /lib/libdl-2.9.so
3d22a03000-3d22a04000 rw-p 00003000 08:01 443256 /lib/libdl-2.9.so
3d22c00000-3d22c84000 r-xp 00000000 08:01 65409 /lib/libm-2.9.so
3d22c84000-3d22e83000 ---p 00084000 08:01 65409 /lib/libm-2.9.so
3d22e83000-3d22e84000 r--p 00083000 08:01 65409 /lib/libm-2.9.so
3d22e84000-3d22e85000 rw-p 00084000 08:01 65409 /lib/libm-2.9.so
3d23000000-3d23017000 r-xp 00000000 08:01 234632 /lib/libpthread-2.9.so
3d23017000-3d23216000 ---p 00017000 08:01 234632 /lib/libpthread-2.9.so
3d23216000-3d23217000 r--p 00016000 08:01 234632 /lib/libpthread-2.9.so
3d23217000-3d23218000 rw-p 00017000 08:01 234632 /lib/libpthread-2.9.so
3d23218000-3d2321c000 rw-p 3Cancelado (core dumped)

$ xfce4-sensors -v
Xfce4 Sensors 0.10.99.6

$ lsb_release -rd
Description: Ubuntu jaunty (development branch)
Release: 9.04

$ uname -a
Linux host 2.6.28-2-rt #6-Ubuntu SMP PREEMPT RT Tue Mar 10 02:10:20 UTC 2009 x86_64 GNU/Linux

Changed in xfce4-sensors-plugin:
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xfce4-sensors-plugin - 0.10.99.6-0ubuntu2

---------------
xfce4-sensors-plugin (0.10.99.6-0ubuntu2) jaunty; urgency=low

  * debian/patches/01_fix_segfault_at_startup.patch: correctly init *checktext
    to NULL, fixes a crash in free() with invalid pointer [upstream svn r6985]
    (LP: #257656, #344015, #345678).

 -- Lionel Le Folgoc <email address hidden> Thu, 26 Mar 2009 21:03:50 +0100

Changed in xfce4-sensors-plugin:
status: Confirmed → Fix Released
Revision history for this message
rubo77 (rubo77) wrote :

Is there a non-dirty solution to this?

asked here too: http://askubuntu.com/questions/312125/hddtemp-was-not-executed-correctly

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.