new kernel ptrace vuln. patch fails lm_sensors

D.Scott dscott at phivedesign.com
Mon Mar 24 05:27:04 CET 2003


Hi,
I hope this is the right list.  After applying the recent ptrace race 
condition patch to my 2.4.20 gentoo kernel, the following condition 
occurs after a sensors -s:


root at gentoo2 dscott # /usr/local/bin/sensors -s
w83782d-i2c-0-2d: Can't access /proc file for writing;
Run as root?

I am, of course, running this as root.  Prior to the kernel patch I did 
not have this trouble.  When I revert to the pre-patched kernel, it all 
functions once again.  i2c is compiled into the kernel and the chip 
drivers are modules:

root at gentoo2 dscott # lsmod
Module                  Size  Used by    Tainted: P
w83781d                20752   0
eeprom                  3636   0
i2c-amd756              3828   0  (unused)

Finally, here is the strace of /usr/local/bin/sensors -s , any help 
would be appreciated:

root at gentoo2 dscott # strace /usr/local/bin/sensors -s
execve("/usr/local/bin/sensors", ["/usr/local/bin/sensors", "-s"], [/* 
44 vars */]) = 0
uname({sys="Linux", node="gentoo2", ...}) = 0
brk(0)                                  = 0x8062528
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0x40014000
open("/etc/ld.so.preload", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(3)                                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=78517, ...}) = 0
mmap2(NULL, 78517, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3)                                = 0
open("/usr/local/lib/libsensors.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20E\0\000"..., 
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=98988, ...}) = 0
mmap2(NULL, 160996, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40029000
mprotect(0x40035000, 111844, PROT_NONE) = 0
mmap2(0x40035000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0xb) = 0x40035000
mmap2(0x40040000, 66788, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40040000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240Z\1"..., 
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1442311, ...}) = 0
mmap2(NULL, 1228068, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40051000
mprotect(0x40175000, 32036, PROT_NONE)  = 0
mmap2(0x40175000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x123) = 0x40175000
mmap2(0x40179000, 15652, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40179000
close(3)                                = 0
munmap(0x40015000, 78517)               = 0
brk(0)                                  = 0x8062528
brk(0x8063528)                          = 0x8063528
brk(0x8064000)                          = 0x8064000
open("/etc/sensors.conf", O_RDONLY)     = 3
_sysctl({{CTL_DEV, 2, 1}, 3, 0x4003f3e0, 200, (nil), 0}) = 0
open("/proc/bus/i2c", O_RDONLY)         = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0x40015000
read(4, "i2c-0\tsmbus    \tSMBus AMD766 ada"..., 8192) = 82
read(4, "", 8192)                       = 0
close(4)                                = 0
munmap(0x40015000, 8192)                = 0
brk(0x8067000)                          = 0x8067000
ioctl(3, SNDCTL_TMR_TIMEBASE, 0xbfffe660) = -1 ENOTTY (Inappropriate 
ioctl for device)
fstat64(3, {st_mode=S_IFREG|0644, st_size=1589, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0x40015000
read(3, "# Sensors configuration file use"..., 8192) = 1589
read(3, "", 4096)                       = 0
brk(0x8068000)                          = 0x8068000
brk(0x8069000)                          = 0x8069000
read(3, "", 8192)                       = 0
ioctl(3, SNDCTL_TMR_TIMEBASE, 0xbfffe630) = -1 ENOTTY (Inappropriate 
ioctl for device)
_sysctl({{CTL_DEV, 2, 104, 514}, 4, 0x4003f3e0, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3e8}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3e8}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 514}, 4, 0x4003f3e0, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3e8}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3e8}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 514}, 4, 0x4003f3e0, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3e9}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3e9}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 514}, 4, 0x4003f3e0, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3e9}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3e9}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ea}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ea}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ea}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ea}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3eb}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3eb}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3eb}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3eb}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ec}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ec}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ec}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ec}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ed}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ed}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ed}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ed}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ee}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ee}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ee}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ee}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ef}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ef}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3ef}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3ef}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3f0}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3f0}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 3f0}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 3f0}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 5dd}, 4, 0x4003f3e0, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 5dd}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 5de}, 4, 0x4003f3e0, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 5de}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 5df}, 4, 0x4003f3e0, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 5df}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 4b0}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 4b0}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 4b0}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 4b0}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 4b1}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 4b1}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 4b1}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 4b1}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 4b2}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 4b2}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 104, 4b2}, 4, 0x4003f3e0, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 104, 4b2}, 4, ptrace: umoven: Input/output error
(nil), 0, 0x4003f3e0, 8}) = -1 EACCES (Permission denied)
write(2, "w83782d-i2c-0-2d: Can\'t access /"..., 55w83782d-i2c-0-2d: 
Can't access /proc file for writing;
) = 55
write(2, "Run as root?\n", 13Run as root?






More information about the lm-sensors mailing list