Fix sctp privilege elevation (CVE-2006-3745)
sctp_make_abort_user() now takes the msg_len along with the msg so that we don't have to recalculate the bytes in iovec. It also uses memcpy_fromiovec() so that we don't go beyond the length allocated. It is good to have this fix even if verify_iovec() is fixed to return error on overflow. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ac185bdc02
commit
c164a9ba0a
@@ -1520,8 +1520,16 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
|
||||
goto out_unlock;
|
||||
}
|
||||
if (sinfo_flags & SCTP_ABORT) {
|
||||
struct sctp_chunk *chunk;
|
||||
|
||||
chunk = sctp_make_abort_user(asoc, msg, msg_len);
|
||||
if (!chunk) {
|
||||
err = -ENOMEM;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
SCTP_DEBUG_PRINTK("Aborting association: %p\n", asoc);
|
||||
sctp_primitive_ABORT(asoc, msg);
|
||||
sctp_primitive_ABORT(asoc, chunk);
|
||||
err = 0;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
Reference in New Issue
Block a user