Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 167556 - net-analyzer/net-snmp-5.4 crashes when having exec-statements in snmpd.conf
Summary: net-analyzer/net-snmp-5.4 crashes when having exec-statements in snmpd.conf
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-19 00:13 UTC by Torbjörn Svensson
Modified: 2007-04-18 12:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
output from 'emerge --info' (emerge-info,7.76 KB, text/plain)
2007-02-19 00:15 UTC, Torbjörn Svensson
Details
output from gdb (bt full) (backtrace.log,7.19 KB, text/plain)
2007-02-19 00:49 UTC, Torbjörn Svensson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjörn Svensson 2007-02-19 00:13:10 UTC
The crach happens right after I do a snmpwalk on .1.3.6.1.4.1.2021.8.1.101.1


$ cat /etc/snmp/snmpd.conf
rocommunity <community> <loghost>
disk /
exec sensors /usr/local/bin/sensorstats.sh

$ cat /usr/local/bin/mbmonstats.sh
#!/bin/bash
echo -n "STRING: "
mbmon -c 1 -r | sed -e 's/ //g' -e 's/[+-]//' | tr 'A-Z' 'a-z' | tr "\n" ' '

$ strace -f /usr/sbin/snmpd -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf 2>&1 | tail -n 5
open("/etc/hosts.deny", O_RDONLY)       = -1 ENOENT (No such file or directory)
write(3, "Connection from UDP: [<loghost>"..., 41) = 41
gettimeofday({1171843506, 403979}, NULL) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 23987 detached

$ tail -n 1 /var/log/syslog
Feb 19 00:26:10 burk kernel: snmpd[13097]: segfault at 0000000000000060 rip 00002b384ca1cb50 rsp 00007fff5e1f0e20 error 4


Reproducible: Always

Steps to Reproduce:
1. Install net-snmp
2. Add a exec-row to snmpd.conf ans start snmpd
3. do a snmpwalk on .1.3.6.1.4.1.2021.8.1.101.1
Actual Results:  
Timeout: No Response from burk

Expected Results:  
something like (from a debian host):
STRING: v50p:4.95 temp0:31.0 fan1:969 temp1:43.0 v12n:11.18 vc1:1.76 fan0:1854 v33:3.31 vc0:1.76 v12p:12.22 v50n:4.82 temp2:39.5 fan2:1010

$ emerge -pv net-snmp
[ebuild   R   ] net-analyzer/net-snmp-5.4  USE="X ipv6 perl ssl tcpd -diskio -doc -elf -lm_sensors* -mfd-rewrites -minimal -rpm (-selinux) -sendmail -smux" 0 kB
Comment 1 Torbjörn Svensson 2007-02-19 00:15:07 UTC
Created attachment 110595 [details]
output from 'emerge --info'
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-02-19 00:17:26 UTC
Can you backtrace this please?

http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 3 Torbjörn Svensson 2007-02-19 00:49:17 UTC
Created attachment 110598 [details]
output from gdb (bt full)
Comment 4 Torbjörn Svensson 2007-02-19 00:50:33 UTC
Backtrace attached, don't realy know if I should reopen it, but I guess. If it's wrong, fix it :-)
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-02-19 00:59:23 UTC
(In reply to comment #4)
> Backtrace attached, don't realy know if I should reopen it, but I guess.

Yeah, reopening bugs after providing requested info is needed, noone will notice otherwise. :)
Comment 6 Markus Ullmann (RETIRED) gentoo-dev 2007-04-18 12:49:23 UTC
Sent a notify to upstream as this isn't gentoo specific as a quick google pointed out