[linux-yocto] [PATCH v2] ti81xx: Fix buffer overflow error in sysfs pin-mux interface.

Graeme Smecher gsmecher at threespeedlogic.com
Wed Jul 17 08:08:27 PDT 2013


This bug was introduced in commit d00bf72d119d98b2a19b48b2eebdc8b5b657284d.
The declaration of the "mode" variable didn't reserve enough space for ti816x
or ti814x strings. The result was corruption when displaying files in
/sys/kernel/debug/omap_mux.

Signed-off-by: Graeme Smecher <gsmecher at threespeedlogic.com>
To: Ravikumar Kattekola <rk at ti.com>
---
 arch/arm/mach-omap2/mux.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 87e4dd1..983555d 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -445,7 +445,7 @@ static inline void omap_mux_decode(struct seq_file *s, u32 val)
 static inline void ti81xx_mux_decode(struct seq_file *s, u32 val)
 {
 	char *flags[OMAP_MUX_MAX_NR_FLAGS];
-	char mode[sizeof("OMAP_MUX_MODE") + 1];
+	char mode[sizeof("TI81XX_MUX_MODE") + 2];
 	int i = -1;
 
 	if (cpu_is_ti816x()) {
-- 
1.7.10.4




More information about the linux-yocto mailing list