diff options
author | Jan Beulich <JBeulich@suse.com> | 2018-09-25 11:12:30 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-25 20:39:34 +0300 |
commit | 780e83c259fc33e8959fed8dfdad17e378d72b62 (patch) | |
tree | faf5822faa8818ae642a80b29c7d7ea05c23bf5a /drivers/net/xen-netback/interface.c | |
parent | e1e5d8a9fe737d94ccc0ccbaf0c97f69a8f3e000 (diff) | |
download | linux-780e83c259fc33e8959fed8dfdad17e378d72b62.tar.xz |
xen-netback: fix input validation in xenvif_set_hash_mapping()
Both len and off are frontend specified values, so we need to make
sure there's no overflow when adding the two for the bounds check. We
also want to avoid undefined behavior and hence use off to index into
->hash.mapping[] only after bounds checking. This at the same time
allows to take care of not applying off twice for the bounds checking
against vif->num_queues.
It is also insufficient to bounds check copy_op.len, as this is len
truncated to 16 bits.
This is XSA-270 / CVE-2018-15471.
Reported-by: Felix Wilhelm <fwilhelm@google.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Tested-by: Paul Durrant <paul.durrant@citrix.com>
Cc: stable@vger.kernel.org [4.7 onwards]
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions