[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVdNbGmA+tQ54E=eZcKz6EZMBj4n1Udc1SrdsHCyLB-EQ@mail.gmail.com>
Date: Tue, 5 Jan 2016 11:51:16 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Rafael Wysocki <rjw@...ysocki.net>,
linaro-kernel <linaro-kernel@...ts.linaro.org>,
Linux PM list <linux-pm@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Len Brown <len.brown@...el.com>,
open list <linux-kernel@...r.kernel.org>,
Nishanth Menon <nm@...com>, Pavel Machek <pavel@....cz>,
Stephen Boyd <sboyd@...eaurora.org>,
Viresh Kumar <vireshk@...nel.org>
Subject: Re: [PATCH] PM / OPP: Use snprintf() instead of sprintf()
On Tue, Jan 5, 2016 at 11:45 AM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> sprintf() can access memory outside of the range of the character array,
> and is risky in some situations. The driver specified prop_name string
> can be longer than NAME_MAX here (only an attacker will do that though)
> and so blindly copying it into the character array of size NAME_MAX
> isn't safe. Instead we must use snprintf() here.
Thanks!
> Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
Acked-by: Geert Uytterhoeven <geert+renesas@...der.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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