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] [day] [month] [year] [list]
Message-ID: <4b610d50-be8e-af29-c235-0c211cc645b0@gmail.com>
Date:   Wed, 13 Nov 2019 12:28:19 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Cris Forno <cforno12@...ux.vnet.ibm.com>, netdev@...r.kernel.org
Cc:     tlfalcon@...ux.ibm.com
Subject: Re: [PATCH net-next] ibmveth: Detect unsupported packets before
 sending to the hypervisor

On 11/13/19 7:44 AM, Cris Forno wrote:
> Currently, when ibmveth receive a loopback packet, it reports an
> ambiguous error message "tx: h_send_logical_lan failed with rc=-4"
> because the hypervisor rejects those types of packets. This fix
> detects loopback packet and assures the source packet's MAC address
> matches the driver's MAC address before transmitting to the
> hypervisor.
> 
> Signed-off-by: Cris Forno <cforno12@...ux.vnet.ibm.com>
> ---
>  drivers/net/ethernet/ibm/ibmveth.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
> index d654c23..e8bb6c7 100644
> --- a/drivers/net/ethernet/ibm/ibmveth.c
> +++ b/drivers/net/ethernet/ibm/ibmveth.c
> @@ -1011,6 +1011,29 @@ static int ibmveth_send(struct ibmveth_adapter *adapter,
>  	return 0;
>  }
>  
> +static int ibmveth_is_packet_unsupported(struct sk_buff *skb,
> +					 struct net_device *netdev)
> +{
> +	int ret = 0;
> +	struct ethhdr *ether_header;
> +
> +	ether_header = eth_hdr(skb);
> +
> +	if (ether_addr_equal(ether_header->h_dest, netdev->dev_addr)) {
> +		netdev_err(netdev, "veth doesn't support loopback packets, dropping packet.\n");

These error messages should probably be demoted to netdev_dbg() prints,
you would want a maliciously written program to spam your kernel log.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ