W3C home > Mailing lists > Public > public-xmlsec@w3.org > June 2010

RE: How to deal with null references?

From: Pratik Datta <pratik.datta@oracle.com>
Date: Tue, 29 Jun 2010 10:34:46 -0700 (PDT)
Message-ID: <7bbc0b20-7104-4529-9ccc-bf64b0fe0cf2@default>
To: Meiko Jensen <Meiko.Jensen@rub.de>, Thomas Roessler <tlr@w3.org>
Cc: XMLSec WG Public List <public-xmlsec@w3.org>
I am trying to generalize this to not just null references, but also references which unintentionally end up signing very little data.

It would be nice to have a mechanism to indicate the number of bytes that were digested. E.g. the DigestDataLength in the example below . (I know this breaks the schema, so we can't really do it like this)


On the sender side after an application has called the signature library, it can inspect the DigestDataLength to check if it was 0 or a very low number - that would indicate a problem.  
This would also help the receiver know if the sender really intended to digest 0 bytes.


-----Original Message-----
From: Meiko Jensen [mailto:Meiko.Jensen@rub.de] 
Sent: Tuesday, May 11, 2010 9:57 AM
To: Thomas Roessler
Cc: XMLSec WG Public List
Subject: Re: How to deal with null references?

Yes it is, and of course, one should only process what was signed.
However, I know lots of real-world scenarios in the Web Services world
where this is not applied. You process and rely on the soap envelope,
even if it is not signed at all. You have to in order to find the
signature within the header. In the same way, for the Web Services case,
signature validation and application logic may be separated in a way
that prohibits the see-what-was-signed approach (e.g. as a dedicated Web
Service Security Gateway).

For all such cases that do not sufficiently follow the "good principles"
such a restriction may turn out to be rather helpful, and I don't see a
legal use case that would suffer from it (besides one of our ongoing
academic approaches, but that's a different issue).

However, as before, I do not insist in having it in. I just recommend
it, based on my (and my colleague's)  experience.

best regards


Thomas Roessler wrote:
> Isn't this another instance of the more general effect that one shouldn't trust anything -- except for what one gets out of, e.g., evaluating a particular xpath?
> The real problem in the scenario you describe seems to be that neither side verifies that the xpath is what it's believed to be.
> --
> Thomas Roessler, W3C  <tlr@w3.org>  (@roessler)
> On 11 May 2010, at 17:46, Meiko Jensen wrote:
>> Within the discussion on the XPath referencing style I remembered an
>> issue we came across lately:
>> If an XPath contains syntactical errors, this does not result in a
>> visible error. It is only treated differently, and might just result in
>> referencing no node in the actual XML document. If that is not
>> considered as an error in the XML Signature specification, there is a
>> threat of someone screwing it up without noticing. Even the verifier
>> does not notice: nothing was referenced, so the digest is calculated
>> about the empty nodeset, hence about "". As this was exactly the same
>> input as at the signer side, hash values match => signature is valid.
>> However, it protects nothing in the document from modification.
>> Hence, I recommend putting a sentence to XML Signature 2.0 stating that
>> a reference to an empty nodeset MUST be treated as a fault.
>> best regards
>> Meiko
>> -- 
>> Dipl.-Inf. Meiko Jensen
>> Chair for Network and Data Security 
>> Horst Görtz Institute for IT-Security 
>> Ruhr University Bochum, Germany
>> _____________________________
>> Universitätsstr. 150, Geb. IC 4/150
>> D-44780 Bochum, Germany
>> Phone: +49 (0) 234 / 32-26796
>> Telefax: +49 (0) 234 / 32-14347
>> http:// www.nds.rub.de
Received on Tuesday, 29 June 2010 17:37:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:55:14 UTC