lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171205.115518.682628566462536226.davem@davemloft.net>
Date:   Tue, 05 Dec 2017 11:55:18 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     subashab@...eaurora.org
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net-next 4/6] net: qualcomm: rmnet: Process packets
 over ethernet

From: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
Date: Sun,  3 Dec 2017 23:37:06 -0700

> Add support to send and receive packets over ethernet.
> An example of usage is testing the data path on UML. This can be
> achieved by setting up two UML instances in multicast mode and
> associating rmnet over the UML ethernet device.
> 
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
> ---
>  drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> index a46053c..ee20f23 100644
> --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> @@ -15,6 +15,7 @@
>  
>  #include <linux/netdevice.h>
>  #include <linux/netdev_features.h>
> +#include <linux/if_arp.h>
>  #include "rmnet_private.h"
>  #include "rmnet_config.h"
>  #include "rmnet_vnd.h"
> @@ -104,6 +105,12 @@ static void rmnet_set_skb_proto(struct sk_buff *skb)
>  {
>  	struct sk_buff *skbn;
>  
> +	if (skb->dev->type == ARPHRD_ETHER) {
> +		if (skb_headroom(skb) < ETH_HLEN)
> +			kfree_skb(skb);
> +		skb_push(skb, ETH_HLEN);
> +	}

This will crash, you didn't test the new code path that does the
kfree_skb().

You should use an SKB helper function which will realloc the headroom
if ETH_HLEN is not available, instead of failing.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ