lkml.org 
[lkml]   [2005]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.13-rc2-mm2 5/7] v9fs: 9P protocol implementation (2.0.2)
On 7/14/05, Christoph Hellwig <hch@infradead.org> wrote:
> > +static inline void buf_check_size(struct cbuf *buf, int len)
> > +{
> > + if (buf->p+len > buf->ep) {
> > + if (buf->p < buf->ep) {
> > + eprintk(KERN_ERR, "buffer overflow\n");
> > + buf->p = buf->ep + 1;
> > + }
> > + }
> > +}
>
> "handling" a buffer overflow with a printk doesn't seem appopinquate.
> In what cases can this happen and what problems may it cause?
>

I believe all of these cases represent what we would consider to be
protocol errors. I suppose it is possible that our truncation
approach could be used as an exploit in some weird case -- I'll take a
look at fixing things so that any such overflow case is treated as a
fatal protocol error and reported as such (via the protocol as
appropriate).

-eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-14 22:22    [W:3.465 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site