should test handling of multiple From addresses

Bug #644046 reported by Martin Pool
260
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkimpy
Fix Released
Undecided
Stuart Gathman
dkimpy (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Scott Kitterman mentioned problems in some dkim implementations. By inspection I don't think pydkim is vulnerable to this but it would be nice to add a test. He asked that this be kept confidential for now.

----

I've recently become aware that there are potential problems with multiple
From addresses and DKIM. At least one vendor has modified their code to deal
with the problem of a message being DKIM signed with one From and then later
the bad guy adds a second from to the message and resends it. Since the
original From is still there, the signature still validates, but many MUAs
will display the second one leading to a case where users might be presented a
DKIM validates message and a From that isn't the one in the signature.

The solution is to make sure when you are canonicalizing the message include
all From headers and not just one. That way if a From is added, the signature
validation will fail.

I have not had time to check pydkim to see how it handles this. If I do, I'll
let you know. Since this is a protocol vulnerability, it will take some time
to get a coordinated resolution, so if you change things in the meantime,
please don't say you're doing it for security reasons.

Scott K

Revision history for this message
Martin Pool (mbp) wrote :

I would rate this Low priority, because we're probably not vulnerable.

Kees Cook (kees)
Changed in pydkim (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Scott Kitterman (kitterman) wrote :

The potential for this problem is now public.

http://mipassoc.org/pipermail/ietf-dkim/2010q4/014633.html

visibility: private → public
Revision history for this message
Scott Kitterman (kitterman) wrote :

If the additional from is added after the original from then verification will fail. If it's added before the original from, the signature still verifies.

Changed in pydkim:
status: New → Confirmed
Changed in pydkim:
status: Confirmed → In Progress
Revision history for this message
Stuart Gathman (stuart-gathman) wrote :

Added test case.

Revision history for this message
Stuart Gathman (stuart-gathman) wrote :

Committed a fix. My solution was to include an additional from header if at least one is specified in h=. Since there should only be one from header, this should not break legitimate messages. It doesn't break any current test cases.

Changed in pydkim:
milestone: none → 0.5
Changed in pydkim:
status: In Progress → Fix Committed
Changed in pydkim:
assignee: nobody → Stuart Gathman (stuart-gathman)
Changed in pydkim:
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

Source is renamed, so moving the bug.

affects: pydkim (Ubuntu) → dkimpy (Ubuntu)
Changed in dkimpy (Ubuntu):
status: Confirmed → 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.