linux/include/net/sctp
Dan Carpenter fa5f7b51fc sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
This code causes a static checker warning because Smatch doesn't trust
anything that comes from skb->data.  I've reviewed this code and I do
think skb->data can be controlled by the user here.

The sctp_event_subscribe struct has 13 __u8 fields and we want to see
if ours is non-zero.  sn_type can be any value in the 0-USHRT_MAX range.
We're subtracting SCTP_SN_TYPE_BASE which is 1 << 15 so we could read
either before the start of the struct or after the end.

This is a very old bug and it's surprising that it would go undetected
for so long but my theory is that it just doesn't have a big impact so
it would be hard to notice.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-13 16:59:47 -07:00
..
auth.h net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t 2017-07-04 22:35:18 +01:00
checksum.h include/net/: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
command.h sctp: remove the typedef sctp_verb_t 2017-08-11 10:02:44 -07:00
constants.h sctp: remove the typedef sctp_subtype_t 2017-08-06 21:33:42 -07:00
sctp.h sctp: remove the typedef sctp_socket_type_t 2017-08-11 10:02:44 -07:00
sm.h sctp: fix some indents in sm_make_chunk.c 2017-08-11 10:02:44 -07:00
structs.h sctp: remove the typedef sctp_socket_type_t 2017-08-11 10:02:44 -07:00
tsnmap.h sctp: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
ulpevent.h sctp: potential read out of bounds in sctp_ulpevent_type_enabled() 2017-09-13 16:59:47 -07:00
ulpqueue.h sctp: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00