View Issue Details

IDProjectCategoryView StatusLast Update
000526710000-006: MappingsSpecpublic2020-06-18 17:06
ReporterBernd Edlinger Assigned ToRandy Armstrong  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0005267: Protocol Version contradicting in 7.1.2.3/7.1.2.4 vs. 6.7.4
Description

The way how mantis 0004661 is resolved is probably wrong.

I think the new wording in 7.1.2.3/7.1.2.4 contradicts what 6.7.4 says:

6.7.4 OpenSecureChannel says this:

"The ClientProtocolVersion and ServerProtocolVersion parameters are not defined in Part 4 and
are added to the Message to allow backward compatibility if OPC UA-SecureConversation
needs to be updated in the future. Receivers always accept numbers greater than the latest
version that they support. The receiver with the higher version number is expected to ensure
backward compatibility.

If OPC UA-SecureConversation is used with the OPC UA-TCP protocol (see 7.1) then the
version numbers specified in the OpenSecureChannel Messages shall be the same as the
version numbers specified in the OPC UA-TCP protocol Hello/Acknowledge Messages. The
receiver shall close the channel and report a Bad_ProtocolVersionUnsupported error if there
is a mismatch."

This means that each side sends it's highest supported protocol version and the receiver
with the higher version number is expected to ensure backward compatibility, the other
side is expected to accept versions that are higher tan the latest version they support.
And furthermore the version in the HELLO is to be checked against the version in the OSC request,
and the version in the ACK is checked against the version in the OSC response.

We implemented this check in our stack in response the the BSI security review, as you know.
Now the new wording implies the ACK has a version lower than what the server supports
and the old wording was the ACK has the version that the server supports.

In the worst case this can mean a protocol downgrade, since the server shall by the new
wording use the protocol that the client requested in the HELLO but that is unsecured,
and can be modified, respond with an ACK of the lower version, and since the client
receives the ACK with a lower version it shall also use the lower version in the encrypted
OSC request, but OTOH, now the version in the OSC request is different than the one
in the HELLO and the server shall close the connection, right?

Now the wording here is no longer compatible with the new wording in the ACK message
below:

The new wording of 7.1.2.3 HELLO message is now

"The latest version of the UACP protocol supported by the Client.
The Server may reject the Client by returning Bad_ProtocolVersionUnsupported.
If the Server accepts the connection is responsible for ensuring that it returns Messages
that conform to this version of the protocol."

and 7.1.2.4 ACK message is now

"A version of the UACP protocol supported by the Server that is less than or equal to the
the version requested in the Hello Message.
If the Client accepts the connection is responsible for ensuring that it sends Messages that
conform to this version of the protocol."

The previous wording was compatible with 6.7.4:

HELLO message:

"The latest version of the UACP protocol supported by the Client.
The Server may reject the Client by returning Bad_ProtocolVersionUnsupported.
If the Server accepts the connection is responsible for ensuring that it returns
Messages that conform to this version of the protocol.
The Server shall always accept versions greater than what it supports."

ACK message:

"The latest version of the UACP protocol supported by the Server.
If the Client accepts the connection is responsible for ensuring that it sends Messages
that conform to this version of the protocol.
The Client shall always accept versions greater than what it supports."

The old wording here was at least symmetric, and is what we implemented so far.
It should have been added a similar statement as in 6.7.4, that the Receiver with the higher
supported version is responsible to ensure backward compatibility.

And, actually we are unable to find where the current protocol version is specified,
part 4 refers to part 7 and part 6 does not say which protocol version it defines.
It is version 0, and has always been, right? Where is this version number
specified?

TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

has duplicate 0004661 closedRandy Armstrong 10000-006: Mappings The Hello ProtocolVersion description is contradictory 

Activities

Bernd Edlinger

2019-11-20 09:13

reporter   ~0011245

I think Part 6 should just say we always send the protocol version 0 until further notice
and check the protocol version if HELLO/ACK and OpenSecureChannelRequest/Response are the
same, since HELLO is unsecured, and the latter is encrypted. But other than doing this consistency
check ignore the received version number, until further notice. The what protocol versions are
defined should be specified in part6 and not in part7.

Randy Armstrong

2019-11-20 16:48

administrator   ~0011248

Clarified text in Part 6. No change to behavior so no errata.
Reviewed in Security WG meeting on 2019-11-20.

Randy Armstrong

2020-04-21 15:58

administrator   ~0011956

Need errata.

Randy Armstrong

2020-06-17 04:55

administrator   ~0012370

Added to Errata 1.04.7.

Jim Luth

2020-06-18 17:06

administrator   ~0012430

Agreed to changes and Errata in virtual F2F.

Issue History

Date Modified Username Field Change
2019-11-20 09:13 Bernd Edlinger New Issue
2019-11-20 09:13 Bernd Edlinger Note Added: 0011245
2019-11-20 09:13 Bernd Edlinger Relationship added related to 0004661
2019-11-20 16:48 Randy Armstrong Assigned To => Randy Armstrong
2019-11-20 16:48 Randy Armstrong Status new => resolved
2019-11-20 16:48 Randy Armstrong Resolution open => fixed
2019-11-20 16:48 Randy Armstrong Note Added: 0011248
2020-04-21 15:58 Randy Armstrong Status resolved => assigned
2020-04-21 15:58 Randy Armstrong Note Added: 0011956
2020-06-17 04:55 Randy Armstrong Status assigned => resolved
2020-06-17 04:55 Randy Armstrong Note Added: 0012370
2020-06-17 04:56 Randy Armstrong Relationship replaced has duplicate 0004661
2020-06-18 17:06 Jim Luth Status resolved => closed
2020-06-18 17:06 Jim Luth Fixed in Version => 1.05
2020-06-18 17:06 Jim Luth Note Added: 0012430