original_kernel/net/sctp
Jesper Juhl 9abed245a6 Fix memory leak in discard case of sctp_sf_abort_violation()
In net/sctp/sm_statefuns.c::sctp_sf_abort_violation() we may leak
the storage allocated for 'abort' by returning from the function
without using or freeing it. This happens in case
"sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)" is true and we jump to
the 'discard' label.
Spotted by the Coverity checker.

The simple fix is to simply move the creation of the "abort chunk"
to after the possible jump to the 'discard' label. This way we don't
even have to allocate the memory at all in the problem case.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
2007-11-12 10:13:24 -05:00
..
Kconfig
Makefile
associola.c SCTP: Allow ADD_IP to work with AUTH for backward compatibility. 2007-11-07 11:39:27 -05:00
auth.c
bind_addr.c SCTP: Update RCU handling during the ADD-IP case 2007-11-07 11:39:27 -05:00
chunk.c
command.c
crc32c.c
debug.c
endpointola.c SCTP: Convert custom hash lists to use hlist. 2007-11-09 11:43:40 -05:00
input.c SCTP: Convert custom hash lists to use hlist. 2007-11-09 11:43:40 -05:00
inqueue.c SCTP: Fix a potential race between timers and receive path. 2007-11-07 11:39:27 -05:00
ipv6.c
objcnt.c
output.c
outqueue.c SCTP: Always flush the queue when uncorcking. 2007-11-09 11:43:41 -05:00
primitive.c
proc.c SCTP: Convert custom hash lists to use hlist. 2007-11-09 11:43:40 -05:00
protocol.c SCTP: Convert custom hash lists to use hlist. 2007-11-09 11:43:40 -05:00
sm_make_chunk.c SCTP: Make sctp_verify_param return multiple indications. 2007-11-09 11:43:41 -05:00
sm_sideeffect.c SCTP: Fix difference cases of retransmit. 2007-11-07 11:39:27 -05:00
sm_statefuns.c Fix memory leak in discard case of sctp_sf_abort_violation() 2007-11-12 10:13:24 -05:00
sm_statetable.c
socket.c SCTP: Convert custom hash lists to use hlist. 2007-11-09 11:43:40 -05:00
ssnmap.c
sysctl.c SCTP: Allow ADD_IP to work with AUTH for backward compatibility. 2007-11-07 11:39:27 -05:00
transport.c SCTP: Fix difference cases of retransmit. 2007-11-07 11:39:27 -05:00
tsnmap.c
ulpevent.c
ulpqueue.c SCTP: Fix PR-SCTP to deliver all the accumulated ordered chunks 2007-11-09 11:43:41 -05:00