Bug 56801

Summary: perl SNMP.xs module included with ucd-snmp fails "make test"
Product: [Retired] Red Hat Linux Reporter: Steve Bonds <store0>
Component: ucd-snmpAssignee: Phil Knirsch <pknirsch>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-01-25 14:23:45 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:
Attachments:
Description Flags
patch to make SNMP.xs compatible with the post-security2-patch environment none

Description Steve Bonds 2001-11-27 23:29:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; CNF Custom 
IE5.5) [How embarassing!]

Description of problem:
It appears that the massive buf --> sbuf conversion covered in ucd-snmp-
4.2.1-security2.patch breaks the perl-SNMP module included with the UCD 
SNMP distribution.

The file SNMP.xs uses the functions sprint_value(), get_symbol(), and 
sprint_objid().  The declarations in mib.h were modified by the 
aforementioned patch, and changes were carried through to the bulk of the 
UCD SNMP distribution, but were not carried through to the perl SNMP 
module.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. install ucd-snmp-devel and dependencies
2. install source RPM for ucd-snmp
3. rpm -bp ucd-snmp.spec
4. cd ../BUILD/ucd-snmp-4.2.1/perl/SNMP
5. perl Makefile.PL --NET-SNMP-PATH=/usr
6. make
(make note of the warnings during compile.  These nicely show the 
unpatched calls to the patched functions.)
7. make test
8. look for core file left over from test


Actual Results:  Perl coredumps

Expected Results:  Perl should have returned success from the test scripts

Additional info:

Since RedHat does not provide a package for the perl module, it could be 
reasonably claimed that RedHat is under no obligation to patch the code.

However, by fundamentally changing the interface through which the UCD 
SNMP libraries are called without providing any backward compatibility, 
RedHat has created a no-win situation for anyone using the Perl module 
with the updated SNMP distribution.

If I come up with a workable patch, I'll include it later.

Comment 1 Steve Bonds 2001-11-28 00:27:12 UTC
Created attachment 38864 [details]
patch to make SNMP.xs compatible with the post-security2-patch environment

Comment 2 Seth Vidal 2002-01-07 03:39:29 UTC
Well red hat DOES ship the perl-snmp module - from red hat linux DMA from 7.1 -
its in there.

So they _should_ fix this, I think.



Comment 3 Seth Vidal 2002-01-07 04:19:53 UTC
How much have you tested that patch? I  rebuilt the snmp module with it and all
the tests check out but I can't seem to get it to return ALL of any value.

ie: I do a get on sysDescr.0 and it only returns the first two chars.

its ALWAYS the only 2 chars.

any ideas?


Comment 4 Seth Vidal 2002-01-07 04:26:25 UTC
Ok, correction:

if you set:
$SNMP::use_sprint_value=1;

then it misformats string responses to only 2 characters.

some sort of sprintf bug - but probably not caused by your patch - I'll look at
a later perl-snmp for that fix.

thanks
otherwise the patch works well


Comment 5 Seth Vidal 2002-01-25 14:23:39 UTC
further correction - there are an array of situation where the perl module will
crash out and/or return PART of the data it is supposed to return.

This one probably needs a more firm fix by upgrading ucd-snmp to 4.2.3



Comment 6 Phil Knirsch 2002-01-25 14:28:22 UTC
The next rawhide version of ucd-snmp will be based on the 4.2.3 version and
won't contain the huge security2 patch anymore as the security problems have
been fixed upstream.

There are a couple of other fixes pending, but a new version should be available
sometime next week via rawhide.

Thanks,

Read ya, Phil

Comment 7 Seth Vidal 2002-01-25 14:30:32 UTC
cool. I've got an easily recreatable case to test it with.



Comment 8 Seth Vidal 2002-02-07 18:21:52 UTC
I tested it - it fixes the problems I was having with the perl module.

This should probably be released as an errata for 7.1/7.2

b/c it breaks the perl modules y'all shipped on the DMA cd for 7.1


Comment 9 Phil Knirsch 2002-02-08 00:07:17 UTC
There will be an errata for ucd-snmp for 7.2, 7.1, 7 and 6.2 later this month.

Read ya, Phil