public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] efi: fix out-of-bounds null overwrite vulnerability
@ 2016-01-07 19:05 Insu Yun
  2016-01-08 10:13 ` Matt Fleming
  0 siblings, 1 reply; 7+ messages in thread
From: Insu Yun @ 2016-01-07 19:05 UTC (permalink / raw)
  To: matt, linux-efi, linux-kernel
  Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun

snprintf's return value is not bound by size value.
(https://www.kernel.org/doc/htmldocs/kernel-api/API-snprintf.html)
if printed value is larger than buffer size, it can overwrite 
null byte in out-of-bounds buffer.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 drivers/firmware/efi/cper.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c
index d425374..77aa75f 100644
--- a/drivers/firmware/efi/cper.c
+++ b/drivers/firmware/efi/cper.c
@@ -267,7 +267,6 @@ static int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg)
 			     "DIMM location: not present. DMI handle: 0x%.4x ",
 			     mem->mem_dev_handle);
 
-	msg[n] = '\0';
 	return n;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-15  2:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-07 19:05 [PATCH] efi: fix out-of-bounds null overwrite vulnerability Insu Yun
2016-01-08 10:13 ` Matt Fleming
2016-01-08 16:47   ` Luck, Tony
2016-01-11 14:16     ` Matt Fleming
2016-01-11 18:16       ` Luck, Tony
2016-01-14 11:12         ` Matt Fleming
2016-01-15  2:06           ` Tony Luck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox