9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Bounds checking bug in fcall(2) functions
@ 2007-11-09 22:20 Erik Dalén
  2007-11-09 22:42 ` Charles Forsyth
  0 siblings, 1 reply; 8+ messages in thread
From: Erik Dalén @ 2007-11-09 22:20 UTC (permalink / raw)
  To: 9fans

Hi

I discovered that there's a off by one bug in the bounds checking in
statcheck(), convM2D(), convD2M() and convM2S().

For example in convM2D() it sets ebuf as:
ebuf = buf + nbuf;

and then checks if reads will go past ebuf. But ebuf will point to the
first byte after the buffer, so past ebuf will include the byte after
the buffer. So it can potentially try to read of write to one byte
past the buffer in all these functions.

-- 
Erik Dalén
dalen@socialisterna.org

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

end of thread, other threads:[~2007-11-19 10:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-09 22:20 [9fans] Bounds checking bug in fcall(2) functions Erik Dalén
2007-11-09 22:42 ` Charles Forsyth
2007-11-09 23:01   ` Erik Dalén
2007-11-09 23:41     ` Charles Forsyth
2007-11-10 17:55     ` Russ Cox
2007-11-16 10:18     ` [9fans] Bounds checking bug ifcall(2) functions Douglas A. Gwyn
2007-11-16 10:38       ` erik quanstrom
2007-11-19 10:14         ` Douglas A. Gwyn

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).