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]
Date:   Fri, 21 Jul 2017 11:50:24 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Linux Kernel Network Developers <netdev@...r.kernel.org>
Cc:     David Ahern <dsahern@...il.com>, Jiri Pirko <jiri@...nulli.us>
Subject: Re: [Patch net] net: check mac address length for dev_set_mac_address()

On Thu, Jul 20, 2017 at 11:27 AM, Cong Wang <xiyou.wangcong@...il.com> wrote:
> diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
> index 82fd4c9c4a1b..3f41601d7b7c 100644
> --- a/net/core/dev_ioctl.c
> +++ b/net/core/dev_ioctl.c
> @@ -262,6 +262,8 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
>                 return dev_set_mtu(dev, ifr->ifr_mtu);
>
>         case SIOCSIFHWADDR:
> +               if (dev->addr_len > sizeof(struct sockaddr))
> +                       return -EINVAL;
>                 return dev_set_mac_address(dev, &ifr->ifr_hwaddr);
>

Thinking a bit more, I should keep this patch simpler for -net and -stable,
so only the above piece is necessary, the rest pieces can be put to
-net-next.

I will resend this, and the "team: use a larger struct for mac address".

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ