Re: [PATCH] verify: search keyid in hashed signature subpackets (repost)

2016-11-22 Thread Daniel Kiper
On Mon, Nov 21, 2016 at 11:31:26PM +0100, Ignat Korchagin wrote: > On Mon, Nov 21, 2016 at 6:56 PM, Jon McCune wrote: > > On Mon, Nov 21, 2016 at 6:45 AM, Daniel Kiper wrote: > >> > >> On Fri, Nov 18, 2016 at 12:00:08PM +, Ignat Korchagin wrote: > >> > Reposting this, as requested by Daniel a

Re: [PATCH] verify: search keyid in hashed signature subpackets (repost)

2016-11-22 Thread Daniel Kiper
On Mon, Nov 21, 2016 at 11:25:30PM +0100, Ignat Korchagin wrote: > On Mon, Nov 21, 2016 at 3:45 PM, Daniel Kiper wrote: > > On Fri, Nov 18, 2016 at 12:00:08PM +, Ignat Korchagin wrote: > >> Reposting this, as requested by Daniel and rebasing on current tree. > >> > >> Currently GRUB2 verify lo

Re: [PATCH] verify: search keyid in hashed signature subpackets (repost)

2016-11-21 Thread Ignat Korchagin
On Mon, Nov 21, 2016 at 6:56 PM, Jon McCune wrote: > On Mon, Nov 21, 2016 at 6:45 AM, Daniel Kiper wrote: >> >> On Fri, Nov 18, 2016 at 12:00:08PM +, Ignat Korchagin wrote: >> > Reposting this, as requested by Daniel and rebasing on current tree. >> > >> > Currently GRUB2 verify logic searche

Re: [PATCH] verify: search keyid in hashed signature subpackets (repost)

2016-11-21 Thread Ignat Korchagin
On Mon, Nov 21, 2016 at 3:45 PM, Daniel Kiper wrote: > On Fri, Nov 18, 2016 at 12:00:08PM +, Ignat Korchagin wrote: >> Reposting this, as requested by Daniel and rebasing on current tree. >> >> Currently GRUB2 verify logic searches PGP keyid only in unhashed subpackets >> of PGP signature pac

Re: [PATCH] verify: search keyid in hashed signature subpackets (repost)

2016-11-21 Thread Jon McCune
On Mon, Nov 21, 2016 at 6:45 AM, Daniel Kiper wrote: > On Fri, Nov 18, 2016 at 12:00:08PM +, Ignat Korchagin wrote: > > Reposting this, as requested by Daniel and rebasing on current tree. > > > > Currently GRUB2 verify logic searches PGP keyid only in unhashed > subpackets of PGP signature p

Re: [PATCH] verify: search keyid in hashed signature subpackets (repost)

2016-11-21 Thread Daniel Kiper
On Fri, Nov 18, 2016 at 12:00:08PM +, Ignat Korchagin wrote: > Reposting this, as requested by Daniel and rebasing on current tree. > > Currently GRUB2 verify logic searches PGP keyid only in unhashed subpackets > of PGP signature packet. As a result, signatures generated with GoLang > openpg

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-11-15 Thread Ignat Korchagin
A little busy now, but will try to send the patch this week. On Tue, Nov 15, 2016 at 12:42 PM, Daniel Kiper wrote: > On Sun, Nov 13, 2016 at 12:18:05PM +0300, Andrei Borzenkov wrote: > > 10.11.2016 16:50, Daniel Kiper ??: > > > On Thu, Apr 28, 2016 at 10:32:13PM +0100, Ignat Korchagin wr

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-11-15 Thread Daniel Kiper
On Sun, Nov 13, 2016 at 12:18:05PM +0300, Andrei Borzenkov wrote: > 10.11.2016 16:50, Daniel Kiper ??: > > On Thu, Apr 28, 2016 at 10:32:13PM +0100, Ignat Korchagin wrote: > >> Is this going to 2.02? I think it should, because it is a bug. > > > > Andrei, could you take care of it? > > > >

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-11-13 Thread Andrei Borzenkov
10.11.2016 16:50, Daniel Kiper пишет: > On Thu, Apr 28, 2016 at 10:32:13PM +0100, Ignat Korchagin wrote: >> Is this going to 2.02? I think it should, because it is a bug. > > Andrei, could you take care of it? > Yes, I will. I'd also appreciate refreshed patch against current tree. > Ignat, ple

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-11-10 Thread Daniel Kiper
On Thu, Apr 28, 2016 at 10:32:13PM +0100, Ignat Korchagin wrote: > Is this going to 2.02? I think it should, because it is a bug. Andrei, could you take care of it? Ignat, please repost this (taking into acount Andrei comments) as separate email with proper SOB, etc. Daniel

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-04-28 Thread Ignat Korchagin
Is this going to 2.02? I think it should, because it is a bug. On Thu, Apr 21, 2016 at 5:54 PM, Ignat Korchagin wrote: > Best of both worlds: I left the READBUF_SIZE as is for the rest of the code, > but rather reallocate the buffer with appropriate length for subpackets > specifically. Hashing

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-04-21 Thread Ignat Korchagin
Best of both worlds: I left the READBUF_SIZE as is for the rest of the code, but rather reallocate the buffer with appropriate length for subpackets specifically. Hashing is outside of the keyid search function, so the name is good this time. Still did not get your response about PGP private te

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-04-19 Thread Ignat Korchagin
Was preparing test data for the above patch. I wanted to reuse files and keys in tests/file_filter. There are two files: keys and keys.pub. I assumed first one is private key, while the other one is public. However, it seems that keys is public as well. Is the test private key for this public key a

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-04-10 Thread Ignat Korchagin
> TBH I still think that simply setting READBUF_SIZE to 64K is the simplest > solution. I would agree, but I was just a little concerned about allocating large buffer. I'm not sure whether GRUB is considered to be able to run on very resource constrained environments and it seemed that per-subpac

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-04-08 Thread Andrei Borzenkov
30.03.2016 17:09, Ignat Korchagin пишет: > Implemented as a separate function which should process arbitrary length data. TBH I still think that simply setting READBUF_SIZE to 64K is the simplest solution. > As for tests, it seems that the easiest way is to add this signature to tests/file_filter

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-03-30 Thread Ignat Korchagin
Implemented as a separate function which should process arbitrary length data. As for tests, it seems that the easiest way is to add this signature to tests/file_filter. Not sure how should I send you the patch with binary data though. diff --git a/grub-core/commands/verify.c b/grub-core/comman

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-03-30 Thread Andrei Borzenkov
On Wed, Mar 30, 2016 at 11:47 AM, Ignat Korchagin wrote: > Well the code was copied from handling unhashed subpackets and has > same assumptions. I do agree that it does not handle arbitrary length > data. But if you consider it wrong, it should be changed for both > hashed and unhashed packets. C

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-03-30 Thread Ignat Korchagin
Well the code was copied from handling unhashed subpackets and has same assumptions. I do agree that it does not handle arbitrary length data. But if you consider it wrong, it should be changed for both hashed and unhashed packets. Currently, for example, if the length of unhashed subpackets will b

Re: [PATCH] verify: search keyid in hashed signature subpackets

2016-03-29 Thread Andrei Borzenkov
29.03.2016 22:02, Ignat Korchagin пишет: > Currently GRUB2 verify logic searches PGP keyid only in unhashed subpackets > of PGP signature packet. As a result, signatures generated with GoLang > openpgp package (https://godoc.org/golang.org/x/crypto/openpgp) could not be > verified, because this