summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-09-13 23:00:54 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-12 09:51:20 (GMT)
commitb70bb9bb7277aa396eafab6a313ee829c7957587 (patch)
tree7a96dad6999ebe397f6958d98d2cd01f61267be2 /fs
parentf86d3b1a28a7271774fe4e8a9a028f6b209e1fd3 (diff)
downloadlinux-b70bb9bb7277aa396eafab6a313ee829c7957587.tar.xz
sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
[ Upstream commit fa5f7b51fc3080c2b195fa87c7eca7c05e56f673 ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions