From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.outflux.net ([198.145.64.163]:57666 "EHLO smtp.outflux.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216Ab3IPXh0 (ORCPT ); Mon, 16 Sep 2013 19:37:26 -0400 Date: Mon, 16 Sep 2013 16:37:20 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH] dvb: fix potential format string leak Message-ID: <20130916233720.GA3967@www.outflux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-media-owner@vger.kernel.org List-ID: Make sure that a format string cannot accidentally leak into the printk buffer. Signed-off-by: Kees Cook --- drivers/media/dvb-frontends/dib9000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/dib9000.c b/drivers/media/dvb-frontends/dib9000.c index 6201c59..61b2cfe 100644 --- a/drivers/media/dvb-frontends/dib9000.c +++ b/drivers/media/dvb-frontends/dib9000.c @@ -649,7 +649,7 @@ static int dib9000_risc_debug_buf(struct dib9000_state *state, u16 * data, u8 si b[2 * (size - 2) - 1] = '\0'; /* Bullet proof the buffer */ if (*b == '~') { b++; - dprintk(b); + dprintk("%s", b); } else dprintk("RISC%d: %d.%04d %s", state->fe_id, ts / 10000, ts % 10000, *b ? b : ""); return 1; -- 1.7.9.5 -- Kees Cook Chrome OS Security