[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5400606B.8010905@bfs.de>
Date: Fri, 29 Aug 2014 13:13:47 +0200
From: walter harms <wharms@....de>
To: Dan Carpenter <dan.carpenter@...cle.com>
CC: linux-kernel@...r.kernel.org,
George Zhang <georgezhang@...are.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [patch] VMCI: integer overflow in vmci_datagram_dispatch()
Am 29.08.2014 10:42, schrieb Dan Carpenter:
> This is untrusted user data from vmci_host_do_send_datagram() so the
> VMCI_DG_SIZE() macro can have an integer overflow.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
> diff --git a/drivers/misc/vmw_vmci/vmci_datagram.c b/drivers/misc/vmw_vmci/vmci_datagram.c
> index f3cdd90..8226652 100644
> --- a/drivers/misc/vmw_vmci/vmci_datagram.c
> +++ b/drivers/misc/vmw_vmci/vmci_datagram.c
> @@ -328,7 +328,8 @@ int vmci_datagram_dispatch(u32 context_id,
>
> BUILD_BUG_ON(sizeof(struct vmci_datagram) != 24);
>
> - if (VMCI_DG_SIZE(dg) > VMCI_MAX_DG_SIZE) {
> + if (dg->payload_size > VMCI_MAX_DG_SIZE ||
> + VMCI_DG_SIZE(dg) > VMCI_MAX_DG_SIZE) {
> pr_devel("Payload (size=%llu bytes) too big to send\n",
> (unsigned long long)dg->payload_size);
> return VMCI_ERROR_INVALID_ARGS;
Are your sure about that ">" ? maybe ">=" was intended ?
re,
wh
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists