qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: anthony@codemonkey.ws
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] ccid: Fix buffer overrun in handling of VSC_ATR message
Date: Tue, 29 Nov 2011 11:36:34 +0200	[thread overview]
Message-ID: <20111129093634.GA7747@garlic.tlv.redhat.com> (raw)
In-Reply-To: <1322508457-25520-1-git-send-email-armbru@redhat.com>

On Mon, Nov 28, 2011 at 08:27:37PM +0100, Markus Armbruster wrote:
> ATR size exceeding the limit is diagnosed, but then we merrily use it
> anyway, overrunning card->atr[].
> 
> The message is read from a character device.  Obvious security
> implications unless the other end of the character device is trusted.
> 
> Spotted by Coverity.  CVE-2011-4111.
> 

Anthony, do you want me to do a pull request for this or can you merge
it as is?

Alon

> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  hw/ccid-card-passthru.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/ccid-card-passthru.c b/hw/ccid-card-passthru.c
> index 2cbc81b..9f51c6c 100644
> --- a/hw/ccid-card-passthru.c
> +++ b/hw/ccid-card-passthru.c
> @@ -150,6 +150,7 @@ static void ccid_card_vscard_handle_message(PassthruState *card,
>              error_report("ATR size exceeds spec, ignoring");
>              ccid_card_vscard_send_error(card, scr_msg_header->reader_id,
>                                          VSC_GENERAL_ERROR);
> +            break;
>          }
>          memcpy(card->atr, data, scr_msg_header->length);
>          card->atr_length = scr_msg_header->length;
> -- 
> 1.7.6.4
> 

  reply	other threads:[~2011-11-29  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28 19:27 [Qemu-devel] [PATCH] ccid: Fix buffer overrun in handling of VSC_ATR message Markus Armbruster
2011-11-29  9:36 ` Alon Levy [this message]
2011-11-29  9:51   ` Markus Armbruster

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=20111129093634.GA7747@garlic.tlv.redhat.com \
    --to=alevy@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@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).