[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1316527960.3189.9.camel@localhost.localdomain>
Date: Tue, 20 Sep 2011 10:12:40 -0400
From: Mimi Zohar <zohar@...ux.vnet.ibm.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: linux-security-module@...r.kernel.org,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
James Morris <jmorris@...ei.org>,
David Safford <safford@...son.ibm.com>
Subject: Re: [PATCH 2/3] trusted-keys: check hex2bin result
On Tue, 2011-09-20 at 16:57 +0300, Andy Shevchenko wrote:
> On Tue, Sep 20, 2011 at 4:15 PM, Mimi Zohar <zohar@...ux.vnet.ibm.com> wrote:
> > From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
> >
> > For each hex2bin call in trusted keys, check that the ascii hex string is
> > valid. On failure, return -EINVAL.
> >
> > Signed-off-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
> > Signed-off-by: Mimi Zohar <zohar@...ux.vnet.ibm.com>
> > ---
> > security/keys/trusted.c | 15 +++++++++++----
> > 1 files changed, 11 insertions(+), 4 deletions(-)
> >
> > diff --git a/security/keys/trusted.c b/security/keys/trusted.c
> > index 0c33e2e..9b847e1 100644
> > --- a/security/keys/trusted.c
> > +++ b/security/keys/trusted.c
> > @@ -779,7 +779,9 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
> > opt->pcrinfo_len = strlen(args[0].from) / 2;
> > if (opt->pcrinfo_len > MAX_PCRINFO_SIZE)
> > return -EINVAL;
> > - hex2bin(opt->pcrinfo, args[0].from, opt->pcrinfo_len);
> > + if (!hex2bin(opt->pcrinfo, args[0].from,
> > + opt->pcrinfo_len))
> > + return -EINVAL;
> if (hex2bin(...) < 0)
>
> Everywhere in Patch 2 and 3.
thanks,
Mimi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists