History log of /openbsd-current/usr.sbin/ripd/auth.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.14 23-Apr-2024 jsg

correct indentation; no functional change
ok tb@


Revision tags: OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.13 22-Jun-2023 claudio

Use new ibu API, switch from ibuf_seek() to ibuf_set().
Also use ibuf_data() and ibuf_size().
OK tb@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.12 19-Dec-2019 remi

Validate auth_offset before using it. If it's too big ripd will crash.

RFC 2082, chapter 3.1 sys about the offset:
A 16 bit offset from the RIP-2 header to the MD5 digest (if no
other trailer fields are ever defined, this value equals the
RIP-2 Data Length).

Problem reported by Hiltjo Posthuma.

OK claudio@ deraadt@ benno@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.11 26-May-2010 nicm

branches: 1.11.36; 1.11.38;
Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.10 26-Sep-2009 michele

Whitespace cleanup.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.9 24-Oct-2007 claudio

Make the packet buffer u_int8_t * everywhere. This is binary data and not
a string.


# 1.8 18-Oct-2007 deraadt

spacing


# 1.7 18-Oct-2007 claudio

Massive cleanup in the authentication code. the simple auth_key and the crypt
keys are not strings so a) use u_int8_t instead of char and b) uses memcpy
to copy the full MAX_SIMPLE_AUTH_LEN resp. MD5_DIGEST_LENGTH bytes around.
The parser needs some special code to ensure that the string is not to long
and if it is shorter then the buffer the rest needs to be zero padded.
Avoid to use strncpy() instead use a bzero(); memcpy() combo.
with and OK deraadt@


# 1.6 17-Oct-2007 deraadt

wrong type for digest; ok claudio


Revision tags: OPENBSD_4_2_BASE
# 1.5 31-Mar-2007 michele

Some code cleanups. Added one lint command, removed one unused function and
some other cosmetics.


Revision tags: OPENBSD_4_1_BASE
# 1.4 27-Nov-2006 stevesk

use correct function name in error message; ok henning@


# 1.3 31-Oct-2006 mcbride

Time is not a secret.
Modulate the timer with an MD5 hash of the key to generate the sequence number.
Ensure that the most significant bit of the modulated value is 0 to prevent
wrapping of the sequence number.

ok michele@


# 1.2 19-Oct-2006 mcbride

Correct function name in log_debug() messages


# 1.1 18-Oct-2006 norby

Welcome ripd
started by Michele Marchetto some time ago by using the imsg/three process framework
of ospfd. He implemented most of the daemon with a little help and guidance from
Claudio and I.

Currently the daemon is more or less complete, with the exception of key lifetime
and rollover.

Not yet connected to the builds.
OK claudio@


# 1.13 22-Jun-2023 claudio

Use new ibu API, switch from ibuf_seek() to ibuf_set().
Also use ibuf_data() and ibuf_size().
OK tb@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.12 19-Dec-2019 remi

Validate auth_offset before using it. If it's too big ripd will crash.

RFC 2082, chapter 3.1 sys about the offset:
A 16 bit offset from the RIP-2 header to the MD5 digest (if no
other trailer fields are ever defined, this value equals the
RIP-2 Data Length).

Problem reported by Hiltjo Posthuma.

OK claudio@ deraadt@ benno@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.11 26-May-2010 nicm

branches: 1.11.36; 1.11.38;
Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.10 26-Sep-2009 michele

Whitespace cleanup.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.9 24-Oct-2007 claudio

Make the packet buffer u_int8_t * everywhere. This is binary data and not
a string.


# 1.8 18-Oct-2007 deraadt

spacing


# 1.7 18-Oct-2007 claudio

Massive cleanup in the authentication code. the simple auth_key and the crypt
keys are not strings so a) use u_int8_t instead of char and b) uses memcpy
to copy the full MAX_SIMPLE_AUTH_LEN resp. MD5_DIGEST_LENGTH bytes around.
The parser needs some special code to ensure that the string is not to long
and if it is shorter then the buffer the rest needs to be zero padded.
Avoid to use strncpy() instead use a bzero(); memcpy() combo.
with and OK deraadt@


# 1.6 17-Oct-2007 deraadt

wrong type for digest; ok claudio


Revision tags: OPENBSD_4_2_BASE
# 1.5 31-Mar-2007 michele

Some code cleanups. Added one lint command, removed one unused function and
some other cosmetics.


Revision tags: OPENBSD_4_1_BASE
# 1.4 27-Nov-2006 stevesk

use correct function name in error message; ok henning@


# 1.3 31-Oct-2006 mcbride

Time is not a secret.
Modulate the timer with an MD5 hash of the key to generate the sequence number.
Ensure that the most significant bit of the modulated value is 0 to prevent
wrapping of the sequence number.

ok michele@


# 1.2 19-Oct-2006 mcbride

Correct function name in log_debug() messages


# 1.1 18-Oct-2006 norby

Welcome ripd
started by Michele Marchetto some time ago by using the imsg/three process framework
of ospfd. He implemented most of the daemon with a little help and guidance from
Claudio and I.

Currently the daemon is more or less complete, with the exception of key lifetime
and rollover.

Not yet connected to the builds.
OK claudio@


# 1.12 19-Dec-2019 remi

Validate auth_offset before using it. If it's too big ripd will crash.

RFC 2082, chapter 3.1 sys about the offset:
A 16 bit offset from the RIP-2 header to the MD5 digest (if no
other trailer fields are ever defined, this value equals the
RIP-2 Data Length).

Problem reported by Hiltjo Posthuma.

OK claudio@ deraadt@ benno@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.11 26-May-2010 nicm

branches: 1.11.36; 1.11.38;
Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.10 26-Sep-2009 michele

Whitespace cleanup.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.9 24-Oct-2007 claudio

Make the packet buffer u_int8_t * everywhere. This is binary data and not
a string.


# 1.8 18-Oct-2007 deraadt

spacing


# 1.7 18-Oct-2007 claudio

Massive cleanup in the authentication code. the simple auth_key and the crypt
keys are not strings so a) use u_int8_t instead of char and b) uses memcpy
to copy the full MAX_SIMPLE_AUTH_LEN resp. MD5_DIGEST_LENGTH bytes around.
The parser needs some special code to ensure that the string is not to long
and if it is shorter then the buffer the rest needs to be zero padded.
Avoid to use strncpy() instead use a bzero(); memcpy() combo.
with and OK deraadt@


# 1.6 17-Oct-2007 deraadt

wrong type for digest; ok claudio


Revision tags: OPENBSD_4_2_BASE
# 1.5 31-Mar-2007 michele

Some code cleanups. Added one lint command, removed one unused function and
some other cosmetics.


Revision tags: OPENBSD_4_1_BASE
# 1.4 27-Nov-2006 stevesk

use correct function name in error message; ok henning@


# 1.3 31-Oct-2006 mcbride

Time is not a secret.
Modulate the timer with an MD5 hash of the key to generate the sequence number.
Ensure that the most significant bit of the modulated value is 0 to prevent
wrapping of the sequence number.

ok michele@


# 1.2 19-Oct-2006 mcbride

Correct function name in log_debug() messages


# 1.1 18-Oct-2006 norby

Welcome ripd
started by Michele Marchetto some time ago by using the imsg/three process framework
of ospfd. He implemented most of the daemon with a little help and guidance from
Claudio and I.

Currently the daemon is more or less complete, with the exception of key lifetime
and rollover.

Not yet connected to the builds.
OK claudio@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 26-May-2010 nicm

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.10 26-Sep-2009 michele

Whitespace cleanup.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.9 24-Oct-2007 claudio

Make the packet buffer u_int8_t * everywhere. This is binary data and not
a string.


# 1.8 18-Oct-2007 deraadt

spacing


# 1.7 18-Oct-2007 claudio

Massive cleanup in the authentication code. the simple auth_key and the crypt
keys are not strings so a) use u_int8_t instead of char and b) uses memcpy
to copy the full MAX_SIMPLE_AUTH_LEN resp. MD5_DIGEST_LENGTH bytes around.
The parser needs some special code to ensure that the string is not to long
and if it is shorter then the buffer the rest needs to be zero padded.
Avoid to use strncpy() instead use a bzero(); memcpy() combo.
with and OK deraadt@


# 1.6 17-Oct-2007 deraadt

wrong type for digest; ok claudio


Revision tags: OPENBSD_4_2_BASE
# 1.5 31-Mar-2007 michele

Some code cleanups. Added one lint command, removed one unused function and
some other cosmetics.


Revision tags: OPENBSD_4_1_BASE
# 1.4 27-Nov-2006 stevesk

use correct function name in error message; ok henning@


# 1.3 31-Oct-2006 mcbride

Time is not a secret.
Modulate the timer with an MD5 hash of the key to generate the sequence number.
Ensure that the most significant bit of the modulated value is 0 to prevent
wrapping of the sequence number.

ok michele@


# 1.2 19-Oct-2006 mcbride

Correct function name in log_debug() messages


# 1.1 18-Oct-2006 norby

Welcome ripd
started by Michele Marchetto some time ago by using the imsg/three process framework
of ospfd. He implemented most of the daemon with a little help and guidance from
Claudio and I.

Currently the daemon is more or less complete, with the exception of key lifetime
and rollover.

Not yet connected to the builds.
OK claudio@