Skip to contentSkip to conversation

rsi: avoid format string leak to thread name

PATCH New Kees Cook 1 participant 1 message May 22, 2014

Subsystems (3)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 rsi: avoid format string leak to thread name

Since the rsi_create_kthread interface does not include any format string arguments, make sure that the resulting thread name can never accidentally process the name as a format string.

---
 drivers/net/wireless/rsi/rsi_common.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/rsi/rsi_common.h +1 -1
index f2f70784d4ad..d3fbe33d2324 100644
@@ -63,7 +63,7 @@ static inline int rsi_create_kthread(struct rsi_common *common,
 				     u8 *name)
 {
 	init_completion(&thread->completion);
-	thread->task = kthread_run(func_ptr, common, name);
+	thread->task = kthread_run(func_ptr, common, "%s", name);
 	if (IS_ERR(thread->task))
 		return (int)PTR_ERR(thread->task);
 
Signature · 6 lines
1.7.9.5


-- 
Kees Cook
Chrome OS Security