Skip to contentSkip to conversation

lzo fails crypto self-tests

2.6.32 regression Ben Hutchings 2 participants 4 messages Aug 1, 2015 Stable branch

lore
Share & tools
lore
#0 lore raw

Linux 2.6.32.64 included an update to the lzo compression code. So far as I know, there is nothing wrong with it, but it no longer matches the test vectors in crypto/testmgr. Please cherry-pick this fix:

commit 0ec7382036922be063b515b2a3f1d6f7a607392c

Author: Markus F.X.J. Oberhumer <[email protected]>
Date:   Sun Oct 14 15:39:04 2012 +0200

crypto: testmgr - update LZO compression test vectors

Ben.

Signature · 2 lines
Ben Hutchings
One of the nice things about standards is that there are so many of them.
#1 lore raw

Hi Ben,

Quoted 9 lines · Ben Hutchings

Linux 2.6.32.64 included an update to the lzo compression code. So far as I know, there is nothing wrong with it, but it no longer matches the test vectors in crypto/testmgr. Please cherry-pick this fix:

commit 0ec7382036922be063b515b2a3f1d6f7a607392c

Author: Markus F.X.J. Oberhumer <[email protected]>
Date:   Sun Oct 14 15:39:04 2012 +0200

crypto: testmgr - update LZO compression test vectors

Noted, thank you for the information. I don't understand much the problem you spotted since the change only applies to decompression while the patch above seems to only adjust the compression patterns (I don't know how the compression tests work though). Also, for the fix to behave differently, it requires slightly more than 16 million consecutive 255 bytes to trigger the error path, which the commit above doesn't seem to perform.

But I'm queuing this patch anyway.

Thanks!
Willy

#2 lore raw
Quoted 13 lines · Willy Tarreau

Hi Ben,

Quoted 9 lines · Ben Hutchings

Linux 2.6.32.64 included an update to the lzo compression code. So far as I know, there is nothing wrong with it, but it no longer matches the test vectors in crypto/testmgr. Please cherry-pick this fix:

commit 0ec7382036922be063b515b2a3f1d6f7a607392c

Author: Markus F.X.J. Oberhumer <[email protected]>
Date:   Sun Oct 14 15:39:04 2012 +0200

crypto: testmgr - update LZO compression test vectors

Quoted 8 lines

Noted, thank you for the information. I don't understand much the problem you spotted since the change only applies to decompression while the patch above seems to only adjust the compression patterns (I don't know how the compression tests work though). Also, for the fix to behave differently, it requires slightly more than 16 million consecutive 255 bytes to trigger the error path, which the commit above doesn't seem to perform.

But I'm queuing this patch anyway.

You applied this before the fix:

commit bf1d894fed5852708a989a0a3f5df1a169a06afc

Author: Markus F.X.J. Oberhumer <[email protected]>
Date:   Mon Aug 13 17:25:44 2012 +0200

lib/lzo: Update LZO compression to current upstream version

and that's what breaks the self-tests.

You can see this by trying to load the ubifs module, which uses lzo via the crypto API.

Ben.

Signature · 2 lines
Ben Hutchings
One of the nice things about standards is that there are so many of them.
#3 lore raw
Quoted 25 lines · Ben Hutchings
Quoted 13 lines · Willy Tarreau

Hi Ben,

Quoted 9 lines · Ben Hutchings

Linux 2.6.32.64 included an update to the lzo compression code. So far as I know, there is nothing wrong with it, but it no longer matches the test vectors in crypto/testmgr. Please cherry-pick this fix:

commit 0ec7382036922be063b515b2a3f1d6f7a607392c

Author: Markus F.X.J. Oberhumer <[email protected]>
Date:   Sun Oct 14 15:39:04 2012 +0200

crypto: testmgr - update LZO compression test vectors

Quoted 8 lines

Noted, thank you for the information. I don't understand much the problem you spotted since the change only applies to decompression while the patch above seems to only adjust the compression patterns (I don't know how the compression tests work though). Also, for the fix to behave differently, it requires slightly more than 16 million consecutive 255 bytes to trigger the error path, which the commit above doesn't seem to perform.

But I'm queuing this patch anyway.

You applied this before the fix:

Quoted 7 lines

commit bf1d894fed5852708a989a0a3f5df1a169a06afc

Author: Markus F.X.J. Oberhumer <[email protected]>
Date:   Mon Aug 13 17:25:44 2012 +0200

lib/lzo: Update LZO compression to current upstream version

and that's what breaks the self-tests.

Ah OK I thought it was just the fix which did it, now I understand.

Quoted 2 lines

You can see this by trying to load the ubifs module, which uses lzo via the crypto API.

Thanks for the info.

Willy