|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH resend] allow connecting to xenconsole from remot
On 26/9/06 17:08, "Muli Ben-Yehuda" <muli@xxxxxxxxxx> wrote:
> I can certainly do that - in fact, that's what I started with. But
> even the current xenconsole code suffers from the theoretical problem
> mentioned above of writing to an fd without checking that it is
> writable first. All it takes to exploit it is to run `xenconsole |
> <socket>' and make the system run out of memory so that the socket is
> temporarily not writable. Granted, if this happens you have bigger
> problems, but why not do things right?
I don't believe such a problem exists with the current console code.
We only write() to the tty_fd if it is in the set of writefds after the
select() call in handle_io(). This means it can take at least one byte of
data. We may offer the write() call more than this but, since we set it
O_NONBLOCK, it will simply bite off what it can chew right now and we keep
the rest for later.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|