Bug 991808 - pesign returning 0 length files on SC error
Summary: pesign returning 0 length files on SC error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pesign
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 994333 994386 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-04 15:14 UTC by Richard W.M. Jones
Modified: 2013-08-09 17:12 UTC (History)
11 users (show)

Fixed In Version: kernel-3.10.5-201.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-09 17:12:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
screenshot of failed boot (14.26 KB, image/png)
2013-08-04 15:14 UTC, Richard W.M. Jones
no flags Details

Description Richard W.M. Jones 2013-08-04 15:14:17 UTC
Created attachment 782502 [details]
screenshot of failed boot

Description of problem:

(See attached screenshot)

The rawhide kernel is truncated (zero bytes long).  I first
noticed this because it breaks libguestfs tests in Rawhide.

Version-Release number of selected component (if applicable):

kernel-3.11.0-0.rc3.git4.1.fc20 (x86-64)
build: http://koji.fedoraproject.org/koji/buildinfo?buildID=448178

How reproducible:

100%

Additional info:

See size of vmlinuz file here:
http://koji.fedoraproject.org/koji/rpminfo?rpmID=4275086

Comment 1 Kevin Fenzi 2013-08-04 16:58:18 UTC
This may be a builder failure. 

I noticed some errors related to pesign about that time. Will investigate more.

Comment 2 Kevin Fenzi 2013-08-04 21:20:00 UTC
Yeah, so it looks like pesign failed: 

Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pesignd[16677]: attempting to sign with key "OpenSC Card (Fedora Signer):/CN=Fedora Secure Boot Signer"
Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pcscd: openct/proto-t1.c:177:t1_transceive() T=1 state machine is DEAD. Reset the card first.
Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pcscd: ifdwrapper.c:527:IFDTransmit() Card not transacted: 612
Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pcscd: winscard.c:1606:SCardTransmit() Card not transacted: 0x80100016
Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pesignd[16677]: error signing data: A PKCS #11 module returned CKR_GENERAL_ERROR, indicating that an unrecoverable error has occurred.

I updated and rebooted the builder and it seems ok now. 

We should likely add some checks to the pesign call in the kernel spec to fail the build if signing fails or produces a 0 length vmlinuz.sign.

Comment 3 Josh Boyer 2013-08-05 00:27:54 UTC
(In reply to Kevin Fenzi from comment #2)
> Yeah, so it looks like pesign failed: 
> 
> Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pesignd[16677]: attempting
> to sign with key "OpenSC Card (Fedora Signer):/CN=Fedora Secure Boot Signer"
> Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pcscd:
> openct/proto-t1.c:177:t1_transceive() T=1 state machine is DEAD. Reset the
> card first.
> Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pcscd:
> ifdwrapper.c:527:IFDTransmit() Card not transacted: 612
> Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pcscd:
> winscard.c:1606:SCardTransmit() Card not transacted: 0x80100016
> Aug  4 01:28:15 bkernel01.phx2.fedoraproject.org pesignd[16677]: error
> signing data: A PKCS #11 module returned CKR_GENERAL_ERROR, indicating that
> an unrecoverable error has occurred.
> 
> I updated and rebooted the builder and it seems ok now. 
> 
> We should likely add some checks to the pesign call in the kernel spec to
> fail the build if signing fails or produces a 0 length vmlinuz.sign.

Adding Peter to CC.

If the pesign client fails and returns a correct return code, the %pesign macro should probably catch it.

Otherwise (or in addition to), we can test for a zero file length, but the kernel isn't the only thing using pesign so it's likely best to fix it in the macro if we can.

Comment 4 Josh Boyer 2013-08-05 00:35:02 UTC
And... now actually adding Peter on CC.  Because I just wanted to fake everyone out the first time I said that.

Comment 5 Adam Williamson 2013-08-07 05:23:57 UTC
Sounds like this is affecting the latest f19 build too:

https://lists.fedoraproject.org/pipermail/test/2013-August/117289.html

Comment 6 Josh Boyer 2013-08-07 12:56:20 UTC
Moving this to pesign.  The check for zero length files should probably be done in the %pesign macro.

Comment 7 Josh Boyer 2013-08-07 12:56:42 UTC
*** Bug 994333 has been marked as a duplicate of this bug. ***

Comment 8 Josh Boyer 2013-08-07 12:57:00 UTC
*** Bug 994386 has been marked as a duplicate of this bug. ***

Comment 9 Fedora Update System 2013-08-07 20:48:07 UTC
kernel-3.10.5-201.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/kernel-3.10.5-201.fc19

Comment 10 Fedora Update System 2013-08-09 17:12:40 UTC
kernel-3.10.5-201.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.