Philipp Hancke
13b327b05f
srtp: demonstrate wraparound with loss decryption failure
...
by encryption a packet with sequence number 65535 followed
by a packet with sequence number 1. The second packet is encrypted
with a SRTP ROC of 1 as described in
https://datatracker.ietf.org/doc/html/rfc3711#section-3.3.1
The packets are (received and) decrypted in a different order,
the packet with sequence number 1 (and ROC=1) is decrypted first.
Since the ROC is maintained locally the decrypting session assumes
it to be 0.
Why is that a problem? The RFC recommends estimating the ROC with +-1 which, as demonstrated by the test, libSRTP does not.
But this is a rare problem that requires a random in a high range combined with packet loss/reordering which turns into no-a-problem if you choose carefully as done by packet_sequencer.cc which restricts the initial sequence number in the range 0..32767 which means you do not run into this issue in production.
See also Q6 in libsrtp's historical documentation at
https://srtp.sourceforge.net/historical/faq.html
BUG=webrtc:353565743
Change-Id: I9bd72b198c946937aeb25c229005a0c682447f53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358360
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42798}
2024-08-19 05:17:18 +00:00
..
2024-05-27 15:49:28 +00:00
2024-04-22 14:41:42 +00:00
2023-10-27 12:50:08 +00:00
2023-10-27 12:50:08 +00:00
2023-10-27 12:50:08 +00:00
2023-10-27 12:50:08 +00:00
2023-10-27 12:50:08 +00:00
2023-10-27 12:50:08 +00:00
2020-07-21 14:01:27 +00:00
2020-07-21 14:01:27 +00:00
2020-06-29 12:54:43 +00:00
2023-06-27 21:32:46 +00:00
2023-09-13 18:37:22 +00:00
2023-09-13 18:37:22 +00:00
2023-09-13 18:37:22 +00:00
2024-08-16 14:14:58 +00:00
2024-08-16 14:14:58 +00:00
2024-08-16 14:14:58 +00:00
2024-02-26 11:26:04 +00:00
2020-07-07 12:13:47 +00:00
2020-07-07 12:13:47 +00:00
2021-08-09 15:51:03 +00:00
2021-07-28 09:19:01 +00:00
2021-08-10 10:40:03 +00:00
2023-06-13 13:02:14 +00:00
2023-08-22 09:36:43 +00:00
2023-06-13 13:02:14 +00:00
2023-11-16 18:33:13 +00:00
2023-11-16 18:33:13 +00:00
2023-06-13 13:02:14 +00:00
2023-01-09 21:36:45 +00:00
2023-08-14 13:21:14 +00:00
2024-08-06 17:10:12 +00:00
2024-08-07 12:39:20 +00:00
2023-06-27 21:32:46 +00:00
2021-08-09 15:51:03 +00:00
2023-08-14 13:21:14 +00:00
2023-08-14 13:21:14 +00:00
2023-09-24 20:06:48 +00:00
2023-08-09 10:01:58 +00:00
2024-01-26 12:46:34 +00:00
2023-01-18 12:44:46 +00:00
2023-01-18 12:44:46 +00:00
2023-01-18 12:44:46 +00:00
2023-08-15 13:20:21 +00:00
2024-05-28 13:31:00 +00:00
2024-05-28 13:31:00 +00:00
2024-05-28 13:31:00 +00:00
2022-02-28 10:04:37 +00:00
2024-08-19 05:17:18 +00:00
2023-04-27 11:24:38 +00:00
2024-05-27 15:49:28 +00:00
2023-07-24 14:57:29 +00:00
2024-01-02 12:20:34 +00:00
2024-05-28 13:31:00 +00:00
2024-05-28 13:31:00 +00:00
2024-05-28 13:31:00 +00:00
2024-05-28 13:31:00 +00:00
2024-05-02 21:01:38 +00:00
2023-09-07 13:25:25 +00:00
2024-05-28 13:31:00 +00:00
2024-05-27 15:49:28 +00:00
2023-05-24 14:14:53 +00:00
2023-05-26 08:11:17 +00:00
2024-05-28 13:31:00 +00:00
2024-05-28 13:31:00 +00:00
2023-05-24 14:14:53 +00:00
2023-08-15 13:20:21 +00:00
2022-07-07 12:39:25 +00:00
2022-07-07 12:39:25 +00:00
2023-04-20 02:02:45 +00:00
2024-02-22 16:35:09 +00:00
2024-02-22 16:35:09 +00:00
2021-09-07 14:19:17 +00:00
2021-09-07 14:19:17 +00:00
2021-06-28 16:42:04 +00:00
2021-08-09 15:51:03 +00:00
2020-02-17 14:52:03 +00:00
2020-02-17 14:52:03 +00:00
2023-06-06 10:23:29 +00:00
2024-01-09 13:32:42 +00:00
2024-07-19 08:16:11 +00:00
2022-09-27 06:55:31 +00:00
2020-08-17 16:37:33 +00:00
2021-07-22 14:00:26 +00:00
2022-01-24 11:50:20 +00:00
2021-08-30 09:01:47 +00:00
2022-01-24 11:50:20 +00:00
2024-01-10 14:36:46 +00:00
2024-01-10 14:36:46 +00:00
2022-01-24 11:50:20 +00:00
2024-01-10 14:36:46 +00:00
2024-01-19 16:58:09 +00:00
2022-01-24 11:50:20 +00:00
2024-04-30 15:46:06 +00:00
2024-04-30 15:46:06 +00:00
2023-01-10 12:04:30 +00:00
2021-09-24 13:18:51 +00:00
2023-01-02 14:26:28 +00:00
2020-02-17 14:52:03 +00:00
2020-04-16 17:29:18 +00:00
2024-02-22 23:12:52 +00:00
2024-02-22 23:12:52 +00:00
2021-08-09 15:51:03 +00:00
2021-08-09 15:51:03 +00:00
2024-04-23 12:57:51 +00:00
2024-04-26 12:59:09 +00:00
2024-01-29 12:00:19 +00:00
2024-05-16 14:06:24 +00:00
2024-05-16 14:06:24 +00:00
2024-05-16 14:06:24 +00:00
2024-03-22 10:07:47 +00:00
2024-03-15 08:58:28 +00:00
2024-03-25 10:20:44 +00:00
2024-03-25 10:20:44 +00:00
2023-12-19 13:52:11 +00:00
2024-03-25 10:20:44 +00:00
2024-03-22 10:07:47 +00:00
2023-07-25 06:33:09 +00:00
2024-01-17 11:16:49 +00:00
2021-06-23 13:43:50 +00:00
2021-06-23 13:43:50 +00:00
2024-04-30 15:46:06 +00:00
2024-04-30 15:46:06 +00:00
2024-04-30 15:46:06 +00:00
2024-01-29 12:00:19 +00:00
2024-07-19 08:16:11 +00:00
2023-11-08 15:49:37 +00:00
2023-08-10 20:40:15 +00:00
2024-08-07 12:39:20 +00:00
2024-05-28 13:31:00 +00:00
2024-03-22 12:37:24 +00:00
2023-08-22 08:24:37 +00:00
2024-05-28 13:31:00 +00:00
2024-03-22 12:37:24 +00:00
2024-08-05 13:09:18 +00:00
2024-03-22 10:07:47 +00:00
2024-05-28 13:31:00 +00:00
2023-12-07 15:09:01 +00:00
2024-08-06 17:10:12 +00:00
2024-05-27 15:49:28 +00:00
2024-05-27 15:49:28 +00:00
2024-08-06 17:10:12 +00:00
2024-01-26 12:46:34 +00:00
2024-06-05 08:59:49 +00:00
2024-06-05 08:59:49 +00:00
2024-01-26 12:46:34 +00:00
2024-08-15 16:38:54 +00:00
2024-04-30 15:46:06 +00:00
2024-05-28 13:31:00 +00:00
2024-08-05 13:09:18 +00:00
2021-08-09 15:51:03 +00:00
2021-08-09 15:51:03 +00:00
2021-08-09 15:51:03 +00:00
2021-07-19 14:27:27 +00:00
2021-07-19 14:27:27 +00:00
2021-07-19 14:27:27 +00:00
2023-01-13 13:38:42 +00:00
2023-09-20 09:25:32 +00:00
2023-08-18 13:17:50 +00:00
2023-04-20 02:02:45 +00:00
2023-02-10 08:59:59 +00:00
2023-02-10 08:59:59 +00:00
2024-01-26 12:46:34 +00:00
2024-05-16 13:12:51 +00:00
2023-11-17 13:03:27 +00:00
2023-08-29 10:05:03 +00:00
2024-04-23 14:31:46 +00:00
2023-04-25 08:18:42 +00:00
2024-08-07 12:39:20 +00:00
2024-08-07 12:39:20 +00:00
2024-08-07 12:39:20 +00:00
2023-06-13 13:02:14 +00:00
2023-06-13 13:02:14 +00:00
2023-06-13 13:02:14 +00:00
2023-01-09 21:36:45 +00:00
2023-08-14 13:21:14 +00:00
2023-01-31 11:58:43 +00:00
2020-05-05 13:59:14 +00:00
2020-03-24 15:55:00 +00:00
2023-11-22 11:46:25 +00:00
2020-03-24 15:55:00 +00:00
2020-01-28 19:26:28 +00:00
2020-01-28 19:26:28 +00:00
2024-07-19 08:49:24 +00:00
2024-07-19 08:49:24 +00:00
2020-01-15 12:26:55 +00:00
2024-02-19 16:20:46 +00:00
2024-07-19 08:16:11 +00:00
2024-01-29 12:00:19 +00:00
2021-08-30 09:01:47 +00:00
2021-08-30 09:01:47 +00:00
2021-06-16 17:09:05 +00:00
2024-04-02 18:59:58 +00:00
2024-04-02 18:59:58 +00:00
2021-06-16 17:09:05 +00:00
2020-03-24 15:55:00 +00:00
2020-03-24 15:55:00 +00:00