Skip Menu |
 

Subject: GSS krb5 sequence number checking fails on initial gap token
Text from a pull request by Tomas Kuthan <tkuthan@gmail.com>:
-----
g_order_check() fails iff first token arrives out-of-order

After the queue was re-written to store deltas from firstnum, the first
(dummy) element was changed from firstnum-1 to (-1 & mask). Now, when
the firstnum arrives out of order, it should be inserted between the
dummy element and the element that arrived first. But its delta from
firstnum is zero, which is not greater that the value of dummy element
(all ones binary). It doesn't fit in any other place in the queue
either, and g_order_check returns GSS_S_FAILURE, which (according to the
comment) should never happen.

To reproduce: 2 - 1 - 3
Expected outcome: GSS_S_GAP_TOKEN, GSS_S_UNSEQ_TOKEN, GSS_S_COMPLETE
Actual outcome: GSS_S_GAP_TOKEN, GSS_S_FAILURE, GSS_S_COMPLETE
-----

Ticket #2040 is where util_order.c was changed to store relative
sequence numbers in the queue, introducing this bug.
From: ghudson@mit.edu
Subject: git commit

Fix GSS krb5 initial sequence number gap handling

Since #2040, the dummy queue element inserted by g_order_init no
longer compares less than the initial sequence number, so we fail when
the first few sequence numbers are received out of order. Properly
detect when a sequence number fits between the dummy element and the
first real queue element.

[ghudson@mit.edu: rewrote commit message]

https://github.com/krb5/krb5/commit/13a9cb721194c8aa4ccf6ed6ef23e3ac8dd24037
Author: Tomas Kuthan <tkuthan@gmail.com>
Committer: Greg Hudson <ghudson@mit.edu>
Commit: 13a9cb721194c8aa4ccf6ed6ef23e3ac8dd24037
Branch: master
src/lib/gssapi/generic/util_ordering.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Add tests for GSSAPI sequence number processing

https://github.com/krb5/krb5/commit/40b105e2e6637d370025b4433dc9e1bda5d3950a
Author: Greg Hudson <ghudson@mit.edu>
Commit: 40b105e2e6637d370025b4433dc9e1bda5d3950a
Branch: master
.gitignore | 1 +
src/lib/gssapi/generic/Makefile.in | 9 ++
src/lib/gssapi/generic/deps | 7 ++
src/lib/gssapi/generic/t_seqstate.c | 188 +++++++++++++++++++++++++++++++++++
4 files changed, 205 insertions(+), 0 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Fix t_seqstate build with Solaris compiler

The Solaris native compiler (as of version 5.9) outputs code for
static inline functions even if they are not used. So the
k5buf_to_gss helper in gssapiP_generic.h causes t_seqstate to have a
dependency on libkrb5support.

https://github.com/krb5/krb5/commit/92f76302fa249713ca461e5fe7fa8ea51467b2a3
Author: Greg Hudson <ghudson@mit.edu>
Commit: 92f76302fa249713ca461e5fe7fa8ea51467b2a3
Branch: master
src/lib/gssapi/generic/Makefile.in | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
From: tlyu@mit.edu
Subject: git commit

Fix GSS krb5 initial sequence number gap handling

Since #2040, the dummy queue element inserted by g_order_init no
longer compares less than the initial sequence number, so we fail when
the first few sequence numbers are received out of order. Properly
detect when a sequence number fits between the dummy element and the
first real queue element.

[ghudson@mit.edu: rewrote commit message]

(cherry picked from commit 13a9cb721194c8aa4ccf6ed6ef23e3ac8dd24037)

https://github.com/krb5/krb5/commit/f12b6e40ec0e0a31d5fe441ae52c507c417246b8
Author: Tomas Kuthan <tkuthan@gmail.com>
Committer: Tom Yu <tlyu@mit.edu>
Commit: f12b6e40ec0e0a31d5fe441ae52c507c417246b8
Branch: krb5-1.12
src/lib/gssapi/generic/util_ordering.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
Omitted tests from pullup due to merge conflicts.