From: Dong Liu <dliu.cn@gmail.com>
To: linux-sctp@vger.kernel.org
Subject: 1.0.16 sctp_connectx() in 32 bit
Date: Thu, 13 Mar 2014 02:30:50 +0000 [thread overview]
Message-ID: <5321185A.8050700@gmail.com> (raw)
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.
Thanks,
Dong
next reply other threads:[~2014-03-13 2:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 2:30 Dong Liu [this message]
2014-03-13 8:54 ` 1.0.16 sctp_connectx() in 32 bit Daniel Borkmann
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=5321185A.8050700@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