]> git.baikalelectronics.ru Git - kernel.git/commit
x25: add a sanity check parsing X.25 facilities
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Sep 2013 09:03:40 +0000 (12:03 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Sep 2013 04:27:27 +0000 (00:27 -0400)
commit18fee70d1195545066430432e01d9a552b412097
tree5c864aa3c95f575287ea2f37da2e0589f85a1c1c
parent9797fe4dc96a86f6aed9cd5d7a6b85c614bd9f1b
x25: add a sanity check parsing X.25 facilities

This was found with a manual audit and I don't have a reproducer.  We
limit ->calling_len and ->called_len when we get them from
copy_from_user() in x25_ioctl() so when they come from skb->data then
we should cap them there as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/x25/x25_facilities.c