9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Kernel crash bug
@ 2009-08-01 21:01 Elizabeth Jones
  2009-08-01 21:37 ` cinap_lenrek
  0 siblings, 1 reply; 9+ messages in thread
From: Elizabeth Jones @ 2009-08-01 21:01 UTC (permalink / raw)
  To: 9fans

There exist crash bugs in some of the system call handlers to do with
string validation; sometimes, only the first byte of an argument string is
validated. The following program reliably causes a kernel panic for me:

#include <u.h>
#include <libc.h>

#define SEGBASE (char*)0x40000000
#define SEGSIZE 4096

int main() {
     segattach(0, "shared", SEGBASE, SEGSIZE);
     *(char*)(SEGBASE + SEGSIZE - 1) = 'a';
     exec((char*)SEGBASE + SEGSIZE - 1, nil);
     return 0;
}

-- Elly



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

end of thread, other threads:[~2009-08-02  2:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-01 21:01 [9fans] Kernel crash bug Elizabeth Jones
2009-08-01 21:37 ` cinap_lenrek
2009-08-01 22:01   ` Charles Forsyth
2009-08-01 22:08     ` Russ Cox
2009-08-01 22:47       ` Elizabeth Jones
2009-08-01 23:09         ` Russ Cox
2009-08-01 23:15         ` cinap_lenrek
2009-08-02  1:38         ` erik quanstrom
2009-08-02  2:13           ` 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).