Bug 57080 - snmpd crashes when SMUX client disconnects
Summary: snmpd crashes when SMUX client disconnects
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ucd-snmp
Version: 7.2
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-04 15:13 UTC by Joshua Giles
Modified: 2015-03-05 01:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-12-04 15:13:53 UTC
Embargoed:


Attachments (Terms of Use)

Description Joshua Giles 2001-12-04 15:13:49 UTC
Description of Problem:
When a SMUX client disconnects from snmpd, snmpd crashes.  This did not 
happen with versions of ucd-snmp prior to Red Hat 7.2.

It appears snmpd crashes when it receives the SMUX ClosePDU from the SMUX 
client.



Version-Release number of selected component (if applicable):
(ucd-snmp-4.2.1-7)

How Reproducible:
100%

Steps to Reproduce:
1. send a SMUX ClosePDU while snmpd is running.
2. Here's a code snippet for sending a SMUX ClosePDU:

static void
smux_send_close(int fd, int reason)
{
    u_char outpacket[3], *ptr;

    ptr = outpacket;

    *(ptr++) = (u_char)SMUX_CLOSE;
    *(ptr++) = (u_char)1;
    *ptr = (u_char)(reason & 0xFF);

    if(snmp_get_do_debugging()) 
DEBUGMSGTL (("smux","[smux_close] sending close to fd %d, reason %d\n", 
fd, reason));

    /* send a response back */ 
    if (send (fd, (char *)outpacket, 3, 0) < 0) {
        snmp_log_perror("[smux_snmp_close] send failed");
    }
}

3. 

Actual Results:
snmpd dies

Expected Results:
snmpd should handle it gracefully

Additional Information:

Comment 1 Phil Knirsch 2002-01-29 14:58:20 UTC
The latest version (4.2.3) is available via rawhide now. This should fix this
problem (see bug 56588).

Thanks,

Read ya, Phil



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