1
linux/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
..
associola.c SCTP: Allow ADD_IP to work with AUTH for backward compatibility. 2007-11-07 11:39:27 -05:00
auth.c SCTP endianness annotations regression 2007-10-29 07:41:32 -07:00
bind_addr.c SCTP: Update RCU handling during the ADD-IP case 2007-11-07 11:39:27 -05:00
chunk.c [SCTP]: Enable the sending of the AUTH chunk. 2007-10-10 16:51:31 -07:00
command.c
crc32c.c [SCTP]: #if 0 sctp_update_copy_cksum() 2007-10-26 04:07:20 -07:00
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 [NET]: Forget the zero_it argument of sk_alloc() 2007-11-01 00:39:31 -07:00
Kconfig
Makefile [SCTP]: Implement SCTP-AUTH internals 2007-10-10 16:51:29 -07:00
objcnt.c [SCTP]: Implement SCTP-AUTH internals 2007-10-10 16:51:29 -07:00
output.c [SCTP]: Enable the sending of the AUTH chunk. 2007-10-10 16:51:31 -07:00
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 [SCTP]: Implement the receive and verification of AUTH chunk 2007-10-10 16:51:31 -07:00
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 sctp: fix shadow symbol in net/sctp/tsnmap.c 2007-08-01 11:19:06 -04:00
ulpevent.c [SCTP]: API updates to suport SCTP-AUTH extensions. 2007-10-10 16:51:32 -07:00
ulpqueue.c SCTP: Fix PR-SCTP to deliver all the accumulated ordered chunks 2007-11-09 11:43:41 -05:00