Security and DKIM signature verification failure issues

Bug #1072726 reported by Scott Kitterman
260
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkimpy (Ubuntu)
Fix Released
High
Scott Kitterman
Precise
Fix Released
High
Scott Kitterman
Quantal
Fix Released
High
Scott Kitterman

Bug Description

dkimpy 0.5.1 (in precise) and 0.5.2 (in quantal) both suffer from some severe deficiencies that should be addressed via SRU.

[IMPACT]

 * DKIM 0.5.1/2 does not consider key lenth when validating signatures, so it will produce valid sigatures even when insecure keys are used

 * 0.5.1 and 2 both make incorrect assumptions about header folding and 0.5.2 has a regression from 0.5.1 that causes it to calculate body hash incorrectly. Both of these issue cause DKIM verification failures for some valid signatures.

[TESTCASE]

 * This is very difficult to test in detail. The upstream fixes in 0.5.3 were tested against a number of different signatures generated by different implementations.

* To test that this works, install the updated package and us the dkimsign/dkim verify scripts to verify that DKIM signing and verification still works.

[Regression Potential]

* Low. This is an upstream release that was tested there.

* Regression potential is lower with the new upstream release than with a cherry pick. The only difference between 0.5.2 and 0.5.3 are these fixes. 0.5.1 to 0.5.3 introduces a little more change, but updating to the new version would be lower risk.

[Other Info]

Launchpad uses this module to vaildate mail from Gmail, so it'd be nice to get this fix in soon.

Changed in dkimpy (Ubuntu):
importance: Undecided → Critical
Changed in dkimpy (Ubuntu Precise):
importance: Undecided → Critical
Changed in dkimpy (Ubuntu Quantal):
importance: Undecided → Critical
Changed in dkimpy (Ubuntu):
importance: Critical → High
Changed in dkimpy (Ubuntu Precise):
importance: Critical → High
Changed in dkimpy (Ubuntu Quantal):
importance: Critical → High
Changed in dkimpy (Ubuntu):
assignee: nobody → Scott Kitterman (kitterman)
Changed in dkimpy (Ubuntu Precise):
assignee: nobody → Scott Kitterman (kitterman)
Changed in dkimpy (Ubuntu Quantal):
assignee: nobody → Scott Kitterman (kitterman)
milestone: none → quantal-updates
Changed in dkimpy (Ubuntu Precise):
milestone: none → ubuntu-12.04.2
Revision history for this message
Scott Kitterman (kitterman) wrote :

Including the security team as an FYI, but aiming this at the SRU process as we discussed with opendkim.

Changed in dkimpy (Ubuntu):
status: New → Fix Released
Changed in dkimpy (Ubuntu Precise):
status: New → In Progress
Changed in dkimpy (Ubuntu Quantal):
status: New → In Progress
information type: Public → Public Security
Revision history for this message
Scott Kitterman (kitterman) wrote :

SRU candidates uploaded for both precise and quantal.

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Scott, or anyone else affected,

Accepted dkimpy into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/dkimpy/0.5.3-0ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in dkimpy (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Scott, can you explain why the upload to precise-proposed removes bits of the precise changelog? That seems like it was unintentional.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1072726] Re: Security and DKIM signature verification failure issues

It was because we need to update from 0.5.1 to 0.5.3 since it turns out that
0.5.1 is broken (beyond the key length issue) and 0.5.2 had regressions beyond
that. Since we're updating to 0.5.3, which is what's been sync'ed from Debian
for raring, I made the SRUs based on the raring packaging. The changelog
entries were lost due to the sync.

I'll reupload if you want them there, but I don't think they serve much
purpose. The same information that was in the two lost entries is in the
0.5.2-1 (the 0.5.1ubuntu1/2 revisions were backports of upstream changes from
0.5.2 development.

It would be nice just to land it the way is is and have precise/quantal/raring
be the same except for the version in the changelog entry.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Verified this is working correctly on quantal.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkimpy - 0.5.3-0ubuntu0.1

---------------
dkimpy (0.5.3-0ubuntu0.1) quantal-proposed; urgency=medium

  * Urgency medium for multiple RC bug fixes
  * New upstream release (LP: #1072726):
  * Fix header unfolding and body hash calculation errors that cause
    correct DKIM signatures to fail to verify in many cases
    (Closes: #691663)
  * Add minimum key length requirement to prevent validation of signatures
    generated with insecure keys (Closes: #691662)
 -- Scott Kitterman <email address hidden> Mon, 29 Oct 2012 14:31:35 +0100

Changed in dkimpy (Ubuntu Quantal):
status: Fix Committed → Fix Released
Colin Watson (cjwatson)
Changed in dkimpy (Ubuntu Precise):
milestone: ubuntu-12.04.2 → ubuntu-12.04.3
Revision history for this message
Dave Walker (davewalker) wrote :

This has been sat in the Precise queue since 2012-10-29, do we know why it's not been processed?

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1072726] Re: Security and DKIM signature verification failure issues

Fixed and reuploaded.

Revision history for this message
Dave Walker (davewalker) wrote : Please test proposed package

Hello Scott, or anyone else affected,

Accepted dkimpy into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/dkimpy/0.5.3-0ubuntu0.0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in dkimpy (Ubuntu Precise):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Works.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkimpy - 0.5.3-0ubuntu0.0.1

---------------
dkimpy (0.5.3-0ubuntu0.0.1) precise-proposed; urgency=medium

  * Urgency medium for multiple RC bug fixes
  * New upstream release (LP: #1072726):
  * Fix header unfolding and body hash calculation errors that cause
    correct DKIM signatures to fail to verify in many cases
    (Closes: #691663)
  * Add minimum key length requirement to prevent validation of signatures
    generated with insecure keys (Closes: #691662)

dkimpy (0.5.2-1) unstable; urgency=low

  * New upstream release
    - Change canonicalization defaults to work around issues with different
      verification implementations <https://launchpad.net/bugs/939128>
    - Fully fold DKIM-Signature on sign, and ignore FWS in b= value on verify
    - Fix hashing problem while signing using sha1
  * Add alternate depends on python3-dnspython for python3-dkim since it will
    enter the archive shortly
  * Install tests directory, including test data
  * Drop obsolete breaks on Lenny dkimproxy
  * Fix debian watch to work with package rename and Launchpad changes
  * Bump standards version to 3.9.3 without further change
 -- Scott Kitterman <email address hidden> Mon, 29 Oct 2012 14:31:35 +0100

Changed in dkimpy (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.