diff options
author | Andrew Chant <achant@google.com> | 2017-05-19 15:33:40 -0700 |
---|---|---|
committer | Andrew Chant <achant@google.com> | 2017-05-19 15:33:40 -0700 |
commit | 17ac703739a8ed97807b8a618b8853cdee918a0d (patch) | |
tree | 1399a8bb00c148042161c0574d5b46c19db108d0 | |
parent | 01c34150a90346327a7edc0296ef06a89a73ba9c (diff) | |
parent | 06eff2ac7a9f3f1bec1989000ecefde7e49a71c6 (diff) |
Merge additional July 2017 security update.android-7.1.1_r0.63
Merge 'android-msm-shamu-3.10-security-next'
to pick up missed patches.
July 2017.1
Bug: 38138111
-rw-r--r-- | net/packet/af_packet.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 2e87251cacd2..45b64637aa9b 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -3178,6 +3178,8 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv return -EBUSY; if (copy_from_user(&val, optval, sizeof(val))) return -EFAULT; + if (val > INT_MAX) + return -EINVAL; po->tp_reserve = val; return 0; } @@ -3675,6 +3677,8 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u, rb->frames_per_block = req->tp_block_size/req->tp_frame_size; if (unlikely(rb->frames_per_block <= 0)) goto out; + if (unlikely(req->tp_block_size > UINT_MAX / req->tp_block_nr)) + goto out; if (unlikely((rb->frames_per_block * req->tp_block_nr) != req->tp_frame_nr)) goto out; |