From: David Gibson <dwg@au1.ibm.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-char: BUGFIX, don't call FD_ISSET with negative fd
Date: Wed, 19 Sep 2012 10:30:36 +1000 [thread overview]
Message-ID: <20120919003036.GF24695@truffula.fritz.box> (raw)
In-Reply-To: <50585B00.1060801@suse.de>
On Tue, Sep 18, 2012 at 01:29:04PM +0200, Andreas Färber wrote:
> Am 18.09.2012 02:08, schrieb David Gibson:
> > On Mon, Sep 17, 2012 at 01:24:51PM -0500, Anthony Liguori wrote:
> >> David Gibson <david@gibson.dropbear.id.au> writes:
> >>
> >>> tcp_chr_connect(), unlike for example udp_chr_update_read_handler() does
> >>> not check if the fd it is using is valid (>= 0) before passing it to
> >>> qemu_set_fd_handler2(). If using e.g. a TCP serial port, which is not
> >>> initially connected, this can result in -1 being passed to FD_ISSET, which
> >>> has undefined behaviour. On x86 it seems to harmlessly return 0, but on
> >>> PowerPC, it causes a fortify buffer overflow error to be thrown.
> >>>
> >>> This patch fixes this by putting an extra test in tcp_chr_connect(), and
> >>> also adds an assert qemu_set_fd_handler2() to catch other such errors on
> >>> all platforms, rather than just some.
> >>>
> >>> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> >>
> >> Applied. Thanks.
> >
> > Excellent.
> >
> > Fwiw, I think this one should go into the stable branch, too.
>
> ...which you indicate by cc'ing qemu-stable since that is not handled by
> Anthony himself.
Ah, sorry, I was not aware. Noted for the future.
> Queued for stable-0.15.
Thanks.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2012-09-19 1:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 2:30 [Qemu-devel] [0/2] Bugfixes for 1.2 stable series David Gibson
2012-09-10 2:30 ` [Qemu-devel] [PATCH 1/2] qemu-char: BUGFIX, don't call FD_ISSET with negative fd David Gibson
2012-09-17 18:24 ` Anthony Liguori
2012-09-18 0:08 ` David Gibson
2012-09-18 11:29 ` Andreas Färber
2012-09-19 0:30 ` David Gibson [this message]
2012-09-10 2:30 ` [Qemu-devel] [PATCH 2/2] cpu_physical_memory_write_rom() needs to do TB invalidates David Gibson
2012-09-10 13:27 ` Andreas Färber
2012-09-12 5:57 ` David Gibson
2012-10-01 13:43 ` Pavel Hrdina
2012-10-01 14:28 ` Anthony Liguori
2012-10-01 15:34 ` Pavel Hrdina
2012-10-01 16:21 ` Anthony Liguori
2012-10-01 16:25 ` Pavel Hrdina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120919003036.GF24695@truffula.fritz.box \
--to=dwg@au1.ibm.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).