From: Dong Liu <dliu.cn@gmail.com>
To: linux-sctp@vger.kernel.org
Subject: Re: 1.0.16 sctp_connectx() in 32 bit
Date: Thu, 13 Mar 2014 17:53:55 +0000 [thread overview]
Message-ID: <5321F0B3.5020308@gmail.com> (raw)
In-Reply-To: <5321185A.8050700@gmail.com>
On 3/13/14, 4:54 AM, Daniel Borkmann wrote:
> 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 Daniel,
The patch is small, I can easily apply to my running kernel.
Dong
>> Thanks,
>>
>> Dong
prev parent reply other threads:[~2014-03-13 17:53 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
2014-03-13 17:53 ` Dong Liu [this message]
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=5321F0B3.5020308@gmail.com \
--to=dliu.cn@gmail.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