Re: [ietf-dkim] Proposal for new text about multiple header issues (why multiple h= singleton listing is an ineffective hack, why RFC 5322 compliance is a fuzzy term, and what about malformed MIME str

2010-11-04 Thread Murray S. Kucherawy
> -Original Message-
> From: ietf-dkim-boun...@mipassoc.org [mailto:ietf-dkim-boun...@mipassoc.org] 
> On Behalf Of Alessandro Vesely
> Sent: Thursday, November 04, 2010 12:09 PM
> To: ietf-dkim@mipassoc.org
> Subject: [...]
> 
> Uh, ok, you're right.  I guess I should have stopped arguing since
> this thread became a dialogue among deaf people --I would have done so
> if I had seen any other sign of progress on this subject.
> 
> BTW, I haven't yet tried to submit that EXE file to the DKIM software
> I use.  I will.  I hope we all agree that the spec's better not
> contain phrases such as "an implementation SHOULD crash..." :-/

It boggles my mind that a specification called DomainKeys Identified _MAIL_ has 
to be explicit about the fact that the input is expected to be formatted like a 
mail message, and that there's even pressure to say in a normative way that 
someone implementing this has to make sure that's the case.

Security Considerations of RFC5451 was updated to include language about 
hardening against input deliberately crafted to try to confuse or crash 
applications, and I was surprised that they (secdir) felt that was necessary; I 
expected that to be fairly obvious to anyone in the audience of a standards 
track RFC.

(It wasn't required to be normative, however.)


___
NOTE WELL: This list operates according to 
http://mipassoc.org/dkim/ietf-list-rules.html


Re: [ietf-dkim] The Total Solution is an Integrated One.

2010-11-04 Thread Hector Santos
Charles Lindsey wrote:
> On Thu, 04 Nov 2010 02:04:16 -, Hector Santos  wrote:
> 
>> It is (A) that is most important here and this is where the corrective
>> text should be added.  The original ISSUE Posting included proposed
>> text to follow the "last header" paragraph in Section 5.4:
>>
>> Special Consideration for Verifying and Signing From: Header
>>
>> As an exception, header hash verification MUST be done for all
>> 5322.From fields and not just the last one.  Signing MUST be done
>> for all 5322.From fields found, even though RFC5322 recommends
>> only one 5322.From should be used. This will mitigate any
>> replay that prepends a new 5322.From header to a DKIM signature
>> valid message.  Some MUAs have shown to display only the first
>> 5322.From header found.
> 
> + 1/2
> 
> You seem to imply that hash verification MUST be done for all From 
> fields both during signing AND verification. Fine! You say exactly what 
> is to be done when signing, but leave it unclear what to do if a 
> verifier hashes all the From:s it can find, but finds there are 
> insufficient of them listed in the 'h=' tag.
> 
> So I suggest you add the following:
> 
>   Verification MUST check that all 5322.From fields found have been
>   included in the signature. This will mitigate any deliberate omission
>   to sign some 5322.From (such as the first, which might be the only
>   one displayed by some MUA) by a malicious signer.

+1.

I guess I as a bit bias because the DKIM API I was using had already 
resolve this issue with an option:

 Allow Unsigned From Headers

which was an extra option and by default is zero (OFF, FALSE,
DISABLED) hence each 5322.From header found were checked against the
h= list of tag values.

Think of how a verifier migh parse this stuff. While there could be
different methods, a typical model is a streaming line parser:

while ReadNextLine(line) do
   DKIM_VerifyLine(Line)
wend

As it reads the headers line by line, it checks the h= tags to do the
hashing. The method used in this DKIM API is to remove the h= tag
value as it matched and rehashed the header as it rebuilding the
signature hash.

So when it found the first 5322.From, it checked, hashed and removed
the "from" tag from the list of tags in h=.

If another 5322.From was streamed in, the special IF statement for
"Allow Unsigned From Headers" checked to make sure there was still a
h=from tag for it. If not, an invalid signature result was immediately
returned.

Think of this option as a "plug and play" extra requirement which
allowed an operator to revert to the original 4871 described behavior
if the option was enabled.  When enabled, the presence of a 2nd
5322.From did not violate the 4871 Section 5.4 logic.

My text was basically trying to keep with the idea that its
(erroneously) possible to have an extra 5322.From header but the DKIM
protocol "extra requirement" would enforce only one to be hashed.  So
by saying "header hash verification MUST be done for all
5322.From fields and not just the last one," it will help keep with
the current logic in Section 5.4 but also help create the invalid
signature we are looking for from a "plug and play" aspect.

> And furthermore, I would suggest replacing "5322.From fields" by 
> "once-only fields" (where "once-only" is defined as some explicit list 
> of headers derived from RFCs 5322, 4045 and maybe others - precise 
> contents to be discussed separately).

True. I'm on the fence with that though to the extent here required as
I think the main focus should be with the security issue here which is
mostly with 5322.from since it is the only required DKIM binding for
headers and arguably the #1 Display Header to be concern about.

But sure, even if generic text is used here, it should probably have
an i.e, or e.g, for 5322.from to make sure the prime focus is the main
security reason for these extra considerations.

-- 
Hector Santos, CTO
http://www.santronics.com
http://santronics.blogspot.com



___
NOTE WELL: This list operates according to 
http://mipassoc.org/dkim/ietf-list-rules.html


Re: [ietf-dkim] Proposal for new text about multiple header issues (why multiple h= singleton listing is an ineffective hack, why RFC 5322 compliance is a fuzzy term, and what about malformed MIME str

2010-11-04 Thread Alessandro Vesely
On 03/Nov/10 14:54, John R. Levine wrote:
> At this point, it would be helpful if you could propose specific language
> for 4871bis.  And if it's not presuming 5322 compliance, it would also be
> helpful if you could say in detail what a DKIM signer and verifier should
> do if presented with, say, a Windows executable file.  Not a MIME encoded
> message body containing one, just an EXE file.  If you don't require 5322
> compliance or something close to it, that's as legitimate a signing
> candidate as anything.

Uh, ok, you're right.  I guess I should have stopped arguing since 
this thread became a dialogue among deaf people --I would have done so 
if I had seen any other sign of progress on this subject.

BTW, I haven't yet tried to submit that EXE file to the DKIM software 
I use.  I will.  I hope we all agree that the spec's better not 
contain phrases such as "an implementation SHOULD crash..." :-/
___
NOTE WELL: This list operates according to 
http://mipassoc.org/dkim/ietf-list-rules.html