[ovs-dev] [PATCH] dpif-netdev: Fix use-after-free in dpif_netdev_recv.

Justin Pettit jpettit at nicira.com
Sat Jun 9 23:31:22 UTC 2012


Yikes.  Looks good.  Thanks.

--Justin


On Jun 9, 2012, at 8:55 AM, Ben Pfaff wrote:

> Found by valgrind.
> 
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> lib/dpif-netdev.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
> index fb0a863..cade79e 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -956,7 +956,7 @@ dpif_netdev_recv(struct dpif *dpif, struct dpif_upcall *upcall,
>         free(u);
> 
>         ofpbuf_uninit(buf);
> -        *buf = *u->packet;
> +        *buf = *upcall->packet;
> 
>         return 0;
>     } else {
> -- 
> 1.7.2.5
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev




More information about the dev mailing list