RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1126914 - Ocetets Truncated with Python Bindings
Summary: Ocetets Truncated with Python Bindings
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: net-snmp
Version: 6.7
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: Dalibor Pospíšil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-05 15:05 UTC by kurt.frederiksen
Modified: 2015-07-22 07:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Net-SNMP Python bindings did not check input string of netsnmp_set call and copied only part of the string to the outgoing SNMP SET request when the string contained character with ASCII value 0. Consequence: A Python application could send invalid SNMP SET requests Fix: The Python binding copies full string, including any '\0' characters. Result: Applications send valid SNMP SET requests.
Clone Of:
Environment:
Last Closed: 2015-07-22 07:22:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1385 0 normal SHIPPED_LIVE Moderate: net-snmp security and bug fix update 2015-07-20 18:07:39 UTC

Description kurt.frederiksen 2014-08-05 15:05:59 UTC
Description of problem:
Ocetets Truncated with Python Bindings.

Version-Release number of selected component (if applicable):
net-snmp-5.5-49.el6_5.1.x86_64

How reproducible:
Use net-snmp python bindings to set a SMI object that is of the DateAndTime. Use the date and time of 01/01/2010 00:00. Observe the result on the wire. Observe that the bindings read the '00' characters as a termination character.

Steps to Reproduce:
1. Install net-snmp-python
2. Set DateAndTime object with 01/01/2010 00:00
3. Observe result.

Actual results:
01/01/2010 00:00 is seen as 0x07da0101 on the wire. Which is wrong length per the SMI for DateAndTime per the SNMPv2-TC MIB.

Expected results:
01/01/2010 00:00 should result i na set of 0x07da0101000f0000.

Additional info:
This issue has been resolved in a later version of net-snmp.  A patch which backports the fix to net-snmp-5.5-49.el6_5.1.x86_64 can be found here http://sourceforge.net/p/net-snmp/bugs/2552/ . This patch has been tested by rebuilding the redhat rpm and installing it on the system.

Comment 2 Jan Safranek 2014-08-06 11:27:47 UTC
Thanks for the report.

Just for reference, this small python snippet sends 'hello' instead of 'hello.world', where '.' should be \0 character.

import netsnmp
oid = netsnmp.Varbind('sysDescr', val='hello\000world', type='OCTETSTR')
netsnmp.snmpset(oid, Version=2, DestHost='localhost', Community='public')

Comment 6 errata-xmlrpc 2015-07-22 07:22:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1385.html


Note You need to log in before you can comment on or make changes to this bug.