diff options
author | David S. Miller <davem@davemloft.net> | 2019-08-27 14:23:31 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-27 14:23:31 -0700 |
commit | 68aaf4459556b1f9370c259fd486aecad2257552 (patch) | |
tree | 99d92536a3263634969be6b70a96facea85a0df1 /drivers/s390/net/qeth_core_main.c | |
parent | d00ee466a07eb9182ad3caf6140c7ebb527b4c64 (diff) | |
parent | 9e8312f5e160ade069e131d54ab8652cf0e86e1a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Minor conflict in r8169, bug fix had two versions in net
and net-next, take the net-next hunks.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_core_main.c')
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 8b4ea5f2832b..a7868c8133ee 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -4410,6 +4410,10 @@ static int qeth_snmp_command(struct qeth_card *card, char __user *udata) get_user(req_len, &ureq->hdr.req_len)) return -EFAULT; + /* Sanitize user input, to avoid overflows in iob size calculation: */ + if (req_len > QETH_BUFSIZE) + return -EINVAL; + iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_SNMP_CONTROL, req_len); if (!iob) return -ENOMEM; |