linux-stable-rt/net/sctp
Dan Rosenberg 51e97a12be sctp: Fix out-of-bounds reading in sctp_asoc_get_hmac()
The sctp_asoc_get_hmac() function iterates through a peer's hmac_ids
array and attempts to ensure that only a supported hmac entry is
returned.  The current code fails to do this properly - if the last id
in the array is out of range (greater than SCTP_AUTH_HMAC_ID_MAX), the
id integer remains set after exiting the loop, and the address of an
out-of-bounds entry will be returned and subsequently used in the parent
function, causing potentially ugly memory corruption.  This patch resets
the id integer to 0 on encountering an invalid id so that NULL will be
returned after finishing the loop if no valid ids are found.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-03 21:58:49 -07:00
..
Kconfig
Makefile
associola.c
auth.c sctp: Fix out-of-bounds reading in sctp_asoc_get_hmac() 2010-10-03 21:58:49 -07:00
bind_addr.c
chunk.c
command.c
debug.c
endpointola.c
input.c
inqueue.c
ipv6.c
objcnt.c
output.c sctp: Do not reset the packet during sctp_packet_config(). 2010-09-17 16:47:56 -07:00
outqueue.c
primitive.c
probe.c
proc.c
protocol.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-08-04 15:31:02 -07:00
sm_make_chunk.c
sm_sideeffect.c
sm_statefuns.c sctp: fix test for end of loop 2010-09-09 15:00:29 -07:00
sm_statetable.c
socket.c sctp: prevent reading out-of-bounds memory 2010-10-03 21:58:48 -07:00
ssnmap.c
sysctl.c
transport.c
tsnmap.c
ulpevent.c
ulpqueue.c