Wind River Support Network

HomeDefectsLIN6-5142
Not to be fixed

LIN6-5142 : lksctp-tools: sctp_xconnect: memory leak when malloc big buffer

Created: Jan 15, 2013    Updated: Apr 19, 2018
Resolved Date: Apr 17, 2018
Previous ID: LIN3-27604
Found In Version: 6.0
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Userspace

Description

Problem Description
====================== 
sctp_xconnect CLIENT side has obvious memory leak, 
After some time past, CLIENT failed to malloc and exit unexpectedly 
 

Expected Behavior
====================== 
CLIENT will run unless user make it stop by CTRL+C

Observed Behavior
====================== 
CLIENT failed to malloc and exit unexpectedly 

Logs(Key error logs)
====================== 
none



Workaround

commit 00c7705991e299c51ad7eee22bafa8586964b525
Author: Fan Du <fan.du@windriver.com>
Date:   Tue Jan 15 09:52:03 2013 +0800

    sctp_xconnect: memory leak when malloc big buffer
    
    CLIENT repeatly call process_ready_sockets, which malloc without free,
    so sctp_xconnect exit unexpectly.
    
    v1->v2:
      Declare this buffer statically suggested by Neil Horman.
    
    Signed-off-by: Fan Du <fan.du@windriver.com>
    Acked-by: Neil Horman <nhorman@tuxdriver.com>
    Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Steps to Reproduce

On SERVER side:
lksctp-tools-1.0.11src/apps/sctp_xconnect -H local_ip -P local port -l 

On CLIENT side:
lksctp-tools-1.0.11src/apps/sctp_xconnect -H local_ip -P local port -h server ip -p server port -c -a

Use -a option to send packet actively.

After a while(depends on your memory capacity), CLIENT exit unexpectedly.

Other Downloads


Live chat
Online