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: <CAAObsKBp-hPknWUxJxJGPV1RTj+Q_yc+xxVG315FjQXk9_CK2g@mail.gmail.com>
Date:	Fri, 31 Jul 2015 11:13:59 +0200
From:	Tomeu Vizoso <tomeu@...euvizoso.net>
To:	Kees Cook <keescook@...omium.org>
Cc:	akpm@...ux-foundation.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-clk@...r.kernel.org
Subject: Re: [PATCH] clk_register_clkdev: handle callers needing format string

On 25 July 2015 at 01:20, Kees Cook <keescook@...omium.org> wrote:
> Many callers either use NULL or const strings for the third argument of
> clk_register_clkdev. For those that do not, this is a risk for format
> strings being accidentally processed (for example in device names). This
> adds the missing "%s" arguments to make sure format strings will not leak
> into the clkdev.
>
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---

[...]

> diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c
> index 41cd87c67be6..97d9fb7e89ad 100644
> --- a/drivers/clk/tegra/clk.c
> +++ b/drivers/clk/tegra/clk.c
> @@ -296,7 +296,7 @@ void __init tegra_register_devclks(struct tegra_devclk *dev_clks, int num)
>
>         for (i = 0; i < num; i++, dev_clks++)
>                 clk_register_clkdev(clks[dev_clks->dt_id], dev_clks->con_id,
> -                               dev_clks->dev_id);
> +                               "%s", dev_clks->dev_id);

This causes clocks to be registered with a dev_id string of "(null)",
which is causing lookups that used to succeed before to fail.

Regards,

Tomeu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ