1.0.16 sctp_connectx() in 32 bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, &param, &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
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux