All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Relyea <rrelyea@redhat.com>
To: Alon Levy <alevy@redhat.com>
Cc: Ray Strode <halfline@gmail.com>, Michael Tokarev <mjt@tls.msk.ru>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/2] Try to fix problem with emulated smartcards where invalid PIN succeeds
Date: Mon, 09 Sep 2013 11:19:39 -0700	[thread overview]
Message-ID: <522E113B.80209@REDHAT.COM> (raw)
In-Reply-To: <2011033693.9766969.1378628280847.JavaMail.root@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]

On 09/08/2013 01:18 AM, Alon Levy wrote:
>> I started writing a blog post yesterday about virtualized smartcards here:
>>
>> https://blogs.gnome.org/halfline/2013/09/08/another-smartcard-post/
>>
>> and while testing what I was writing I noticed an invalid PIN worked when
>> it shouldn't have. It turns out that typing a valid PIN once in one program
>> in
>> the guest, is enough to make all future programs asking for the PIN to
>> succeed
>> regardless of what gets typed in for the PIN.
>>
>> I did some digging through the libcacard code, and noticed it uses the
>> NSS PK11_Authenticate function which calls a function that has this comment
>> above it:
>>
>>     If we're already logged in and this function is called we
>>     will still prompt for a password, but we will probably succeed
>>     no matter what the password was.
>>
>> Also, PK11_Authenticate short-circuits to an early "return SECSuccess" if the
>> token
>> is already logged in.
>>
>> The two patches in this series attempt to correct this problem by calling
>> PK11_Logout.
>> I'm not 100% certain I've placed the PK11_Logout call in the best place, but
>> it does
>> seeming to fix the issue.
> Hi Ray,
>
>  Thanks for the patches! It looks good to me but I'll defer to Robert,
>
> Alon

ack... The original problem is a little worse than ray says. It's not a
60 second window, it's pretty much anytime until the card is explicitly
logged out. Ray's patch will fix this.

bob
>
>>
>>



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4521 bytes --]

  reply	other threads:[~2013-09-09 18:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-08  5:08 [Qemu-devel] [PATCH 0/2] Try to fix problem with emulated smartcards where invalid PIN succeeds Ray Strode
2013-09-08  5:08 ` [Qemu-devel] [PATCH 1/2] libcacard: introduce new vcard_emul_logout Ray Strode
2013-09-08  5:08 ` [Qemu-devel] [PATCH 2/2] libcacard: Lock NSS cert db when selecting an applet on an emulated card Ray Strode
2013-09-08  8:18 ` [Qemu-devel] [PATCH 0/2] Try to fix problem with emulated smartcards where invalid PIN succeeds Alon Levy
2013-09-09 18:19   ` Robert Relyea [this message]
2013-09-11 13:35     ` Ray Strode

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=522E113B.80209@REDHAT.COM \
    --to=rrelyea@redhat.com \
    --cc=alevy@redhat.com \
    --cc=halfline@gmail.com \
    --cc=mjt@tls.msk.ru \
    --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 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.