Re: [PATCH v2 net] sctp: potential read out of bounds in sctp_ulpevent_type_enabled()

2017-09-13 Thread David Miller
From: Dan Carpenter Date: Thu, 14 Sep 2017 02:00:54 +0300 > 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

[PATCH v2 net] sctp: potential read out of bounds in sctp_ulpevent_type_enabled()

2017-09-13 Thread Dan Carpenter
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