9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] crashing plan9 source boot CD with key combination (buffer overflow)
@ 2014-06-20 10:22 Yoann Padioleau
  2014-06-20 12:10 ` erik quanstrom
  0 siblings, 1 reply; 2+ messages in thread
From: Yoann Padioleau @ 2014-06-20 10:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi,

There is another buffer overflow somewhere I think.

The code in kbdputsc() in kbd.c does not look very safe:

		kbscan->kc[kbscan->nk++] = c; <--------- no bound checking, can overflow.
		c = latin1(kbscan->kc, kbscan->nk);
		if(c < -1)	/* need more keystrokes */
			return;
		if(c != -1)	/* valid sequence */
			kbdputc(kbdq, c);
		else	/* dump characters */
			for(i=0; i<kbscan->nk; i++)
				kbdputc(kbdq, kbscan->kc[i]);
		kbscan->nk = 0;
		kbscan->collecting = 0;

Actually with the plan9 actual iso, when I boot from the CD
and in rio I open a new terminal and type

<Alt> x ddddddddddddddddddddddddddd <Alt> lc
then I crash the cpu.




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

end of thread, other threads:[~2014-06-20 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20 10:22 [9fans] crashing plan9 source boot CD with key combination (buffer overflow) Yoann Padioleau
2014-06-20 12:10 ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).