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: <c892c7e7b271c9a269c78887777e691dce12f5c8.camel@perches.com>
Date:   Mon, 25 Jun 2018 15:23:05 -0700
From:   Joe Perches <joe@...ches.com>
To:     Kees Cook <keescook@...omium.org>,
        "David S. Miller" <davem@...emloft.net>
Cc:     linux-kernel@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        netdev@...r.kernel.org
Subject: Re: [PATCH v3 net-next] mdio-mux-gpio: Remove VLA usage

On Mon, 2018-06-25 at 15:09 -0700, Kees Cook wrote:
> In the quest to remove all stack VLA usage from the kernel[1], this
> allocates the values buffer during the callback instead of putting it
> on the stack.

[]

> diff --git a/drivers/net/phy/mdio-mux-gpio.c b/drivers/net/phy/mdio-mux-gpio.c
[]
> @@ -44,15 +44,21 @@ static int mdio_mux_gpio_switch_fn(int current_child, int desired_child,
>  static int mdio_mux_gpio_probe(struct platform_device *pdev)
>  {
[]
> +	s = devm_kzalloc(&pdev->dev, sizeof(*s->values) * gpios->ndescs +
> +				     sizeof(*s), GFP_KERNEL);

Isn't this supposed to use your new struct_size()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ