From: Daniel Borkmann <dborkman@redhat.com>
To: linux-sctp@vger.kernel.org
Subject: Re: 1.0.16 sctp_connectx() in 32 bit
Date: Thu, 13 Mar 2014 08:54:48 +0000 [thread overview]
Message-ID: <53217258.1030603@redhat.com> (raw)
In-Reply-To: <5321185A.8050700@gmail.com>
On 03/13/2014 03:30 AM, Dong Liu wrote:
> Hi,
>
> I think I found a problem in the new sctp_connectx() code.
>
> in sctp_connectx3() there are,
>
> struct sctp_getaddrs_old param;
> socklen_t opt_len = sizeof(param);
> status getsockopt(fd, SOL_SCTP, SCTP_SOCKOPT_CONNECTX3, ¶m, &opt_len);
>
> And in kernel net/sctp/socket.c sctp_getsockopt_connectx3(), there is a check,
>
> if (len < sizeof(param)) |
> return -EINVAL; |
>
> But struct sctp_getaddrs_old contains a pointer . When compiled in 32 bit or 64 bit,
> the size of sctp_getaddrs_old is different. So if the kernel is in 64 bit mode but
> the libsctp is in 32 bit mode. sctp_connectx() will fail with EINVAL.
Kernel issue already fixed in:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?idÿd5939381c609056b33b7585fb05a77b4c695f3
> Thanks,
>
> Dong
next prev parent reply other threads:[~2014-03-13 8:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 2:30 1.0.16 sctp_connectx() in 32 bit Dong Liu
2014-03-13 8:54 ` Daniel Borkmann [this message]
2014-03-13 17:53 ` Dong Liu
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=53217258.1030603@redhat.com \
--to=dborkman@redhat.com \
--cc=linux-sctp@vger.kernel.org \
/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