All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	qemu-stable <qemu-stable@nongnu.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] qemu-char: Fix potential out of bounds accessto local arrayss
Date: Thu, 03 Oct 2013 14:23:51 +0100	[thread overview]
Message-ID: <p1ioxebi8o.fsf@linaro.org> (raw)
In-Reply-To: <1380575089-11408-1-git-send-email-sw@weilnetz.de>


sw@weilnetz.de writes:

> Latest gcc-4.8 supports a new option -fsanitize=address which activates
> an AddressSanitizer. This AddressSanitizer stops the QEMU system emulation
> very early because two character arrays of size 8 are potentially written
> with 9 bytes.
>
> Commit 6ea314d91439741e95772dfbab98b4135e04bebb added the code.
>
> There is no obvious reason why width or height could need 8 characters,
> so reduce it to 7 characters which together with the terminating '\0'
> fit into the arrays.
>
> Cc: qemu-stable <qemu-stable@nongnu.org>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
<snip>

Reviewed-by: Alex Bennée <alex@bennee.com>

-- 
Alex Bennée


WARNING: multiple messages have this Message-ID (diff)
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	qemu-stable <qemu-stable@nongnu.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qemu-char: Fix potential out of bounds accessto local arrayss
Date: Thu, 03 Oct 2013 14:23:51 +0100	[thread overview]
Message-ID: <p1ioxebi8o.fsf@linaro.org> (raw)
In-Reply-To: <1380575089-11408-1-git-send-email-sw@weilnetz.de>


sw@weilnetz.de writes:

> Latest gcc-4.8 supports a new option -fsanitize=address which activates
> an AddressSanitizer. This AddressSanitizer stops the QEMU system emulation
> very early because two character arrays of size 8 are potentially written
> with 9 bytes.
>
> Commit 6ea314d91439741e95772dfbab98b4135e04bebb added the code.
>
> There is no obvious reason why width or height could need 8 characters,
> so reduce it to 7 characters which together with the terminating '\0'
> fit into the arrays.
>
> Cc: qemu-stable <qemu-stable@nongnu.org>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
<snip>

Reviewed-by: Alex Bennée <alex@bennee.com>

-- 
Alex Bennée

  parent reply	other threads:[~2013-10-03 15:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30 21:04 [Qemu-trivial] [PATCH] qemu-char: Fix potential out of bounds access to local arrays Stefan Weil
2013-09-30 21:04 ` [Qemu-devel] " Stefan Weil
2013-10-02 16:34 ` [Qemu-trivial] " Michael Tokarev
2013-10-02 16:34   ` [Qemu-devel] " Michael Tokarev
2013-10-03 13:23 ` Alex Bennée [this message]
2013-10-03 13:23   ` [Qemu-devel] [PATCH] qemu-char: Fix potential out of bounds accessto local arrayss Alex Bennée

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=p1ioxebi8o.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=anthony@codemonkey.ws \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.