[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140311202446.GA24531@www.outflux.net>
Date: Tue, 11 Mar 2014 13:24:46 -0700
From: Kees Cook <keescook@...omium.org>
To: linux-kernel@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>, sparclinux@...r.kernel.org
Subject: [PATCH] sparc: use %s for unaligned panic
Since unaligned_panic() takes a literal string, make sure it can never
accidentally be used as a format string.
Signed-off-by: Kees Cook <keescook@...omium.org>
---
arch/sparc/kernel/unaligned_32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/kernel/unaligned_32.c b/arch/sparc/kernel/unaligned_32.c
index c0ec89786193..892e399414e0 100644
--- a/arch/sparc/kernel/unaligned_32.c
+++ b/arch/sparc/kernel/unaligned_32.c
@@ -162,7 +162,7 @@ unsigned long safe_compute_effective_address(struct pt_regs *regs,
/* This is just to make gcc think panic does return... */
static void unaligned_panic(char *str)
{
- panic(str);
+ panic("%s", str);
}
/* una_asm.S */
--
1.7.9.5
--
Kees Cook
Chrome OS Security
--
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