lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Aug 2009 16:36:42 +0200
From:	Roel Kluin <roel.kluin@...il.com>
To:	samuel.thibault@...-lyon.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] braille_console: Read buffer overflow

Prevent write to console_buf[-1]

Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
If console_newline is true and console_cursor equals WIDTH
c is written to console_buf[-1].

diff --git a/drivers/accessibility/braille/braille_console.c b/drivers/accessibility/braille/braille_console.c
index d672cfe..fb4075b 100644
--- a/drivers/accessibility/braille/braille_console.c
+++ b/drivers/accessibility/braille/braille_console.c
@@ -322,7 +322,8 @@ static int vt_notifier_call(struct notifier_block *blk,
 					(WIDTH-1) * sizeof(*console_buf));
 			else
 				console_cursor++;
-			console_buf[console_cursor-1] = c;
+			if (console_cursor != 0)
+				console_buf[console_cursor-1] = c;
 			break;
 		}
 		if (console_show)
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ