Red Hat Bugzilla – Bug 56801
perl SNMP.xs module included with ucd-snmp fails "make test"
Last modified: 2015-03-04 20:09:57 EST
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
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
Version-Release number of selected component (if applicable):
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
(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
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.
Created attachment 38864 [details]
patch to make SNMP.xs compatible with the post-security2-patch environment
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.
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.
if you set:
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.
otherwise the patch works well
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
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.
Read ya, Phil
cool. I've got an easily recreatable case to test it with.
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
There will be an errata for ucd-snmp for 7.2, 7.1, 7 and 6.2 later this month.
Read ya, Phil