Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239311 - net-analyzer/net-snmp-5.4.1.1 - bad files/net-snmp-5.4.1-CVE-2008-2292.patch
Summary: net-analyzer/net-snmp-5.4.1.1 - bad files/net-snmp-5.4.1-CVE-2008-2292.patch
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-02 09:59 UTC by Oliver Graf
Modified: 2009-03-02 12:58 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Graf 2008-10-02 09:59:54 UTC
The net-snmp 4.1.1.1 ebuild applies a patch named net-snmp-5.4.1-CVE-2008-2292.patch which patches python/netsnmp/client_intf.c line -330,14 +330,15 from 
 sprintf(buf,"%ld", *var->val.integer);
to
 snprintf(buf,"%ld", buf_len, *var->val.integer);

This may produce a SEGFAULT, cause it's the wrong order of arguments for snprintf (buf_len needs to be the second arg, and the format string is the third). The correct line is:

 snprintf(buf, buf_len, "%ld", *var->val.integer);


Reproducible: Always

Steps to Reproduce:

Actual Results:  
A SEGFAULT happens for ASN_INTEGER values.

Expected Results:  
no SEGFAULT obviously :)
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-02 15:42:31 UTC
I'm sure you meant 5.4.1.1 not 4.1.1.1. :)

@pva: Please review this patch to the patch. :)

Index: files/net-snmp-5.4.1-CVE-2008-2292.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/net-snmp-5.4.1-CVE-2008-2292.patch,v
retrieving revision 1.1
diff -u -B -r1.1 net-snmp-5.4.1-CVE-2008-2292.patch
--- files/net-snmp-5.4.1-CVE-2008-2292.patch    6 Jun 2008 20:06:33 -0000       1.1
+++ files/net-snmp-5.4.1-CVE-2008-2292.patch    2 Oct 2008 15:40:25 -0000
@@ -122,7 +122,7 @@
             }
             if (!len) {
 -              sprintf(buf,"%ld", *var->val.integer);
-+              snprintf(buf,"%ld", buf_len, *var->val.integer);
++              snprintf(buf, buf_len, "%ld", *var->val.integer);
                len = STRLEN(buf);
             }
             break;
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2009-03-02 12:58:41 UTC
Thank you for report Oliver. This is not an issue with 5.4.2.1 which is most secure and should be used anyway. So this bug is already FIXED and we have nothing to do (well, I'll remove all old versions and this patch very soon). So resolving this bug as WONTFIX since I'm not going to update patch which nobody should use at the moment. Please open new reports for issues you find with 5.4.2.1.