From: Eugene Teo <eteo@redhat.com>
To: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-sctp@vger.kernel.org, security@kernel.org
Subject: Re: [PATCH] sctp: add verification checks to SCTP_AUTH_KEY option
Date: Tue, 26 Aug 2008 11:01:05 +0800 [thread overview]
Message-ID: <48B371F1.5080605@redhat.com> (raw)
In-Reply-To: <48B35B59.2020208@hp.com>
Vlad Yasevich wrote:
> Eugene Teo wrote:
>> Vlad Yasevich wrote:
[...]
>>> + if (authkey->sca_keylength > optlen) {
>>> + ret = -EINVAL;
>>> + goto out;
>> Is there a better upper bound check?
>
> Hm... optlen - sizeof(struct sctp_authkey) is more accurate.
>
> There is really no other bound.
Linus suggested that it is better to declare an upper bound for key_len.
I think it makes a lot of sense as a key shouldn't be as long as the
boundary limit of its declared data type.
Thanks,
Eugene
next prev parent reply other threads:[~2008-08-26 3:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080825164440.GA504@kernel.sg>
2008-08-25 20:25 ` [PATCH] sctp: add verification checks to SCTP_AUTH_KEY option Vlad Yasevich
2008-08-25 22:17 ` David Miller
2008-08-26 0:59 ` Eugene Teo
2008-08-26 1:19 ` [Security] " Linus Torvalds
2008-08-26 1:28 ` Linus Torvalds
2008-08-26 1:24 ` Vlad Yasevich
2008-08-26 3:01 ` Eugene Teo [this message]
2008-08-26 13:37 ` Vlad Yasevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48B371F1.5080605@redhat.com \
--to=eteo@redhat.com \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=security@kernel.org \
--cc=vladislav.yasevich@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).