]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: Fix a big endian bug in sctp_diag_dump()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Sep 2017 10:19:26 +0000 (13:19 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Sep 2017 04:16:29 +0000 (21:16 -0700)
commite3b6e62e574a88dd6f3aace786b36102362a702b
tree45ccf097fc85211099c24611e05eee2eece6ee6f
parentc3f4f9586b0ef5835780c690e855913337b713bd
sctp: Fix a big endian bug in sctp_diag_dump()

The sctp_for_each_transport() function takes an pointer to int.  The
cb->args[] array holds longs so it's only using the high 32 bits.  It
works on little endian system but will break on big endian 64 bit
machines.

Fixes: 6a6f6f6c160d ("sctp: fix an use-after-free issue in sctp_sock_dump")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sctp_diag.c