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
..
2023-06-09 14:14:12 +00:00
2024-05-16 10:39:10 +00:00
2024-08-13 15:28:34 +00:00
2023-11-13 13:23:04 +00:00
2024-04-25 07:54:28 +00:00
2024-04-25 07:54:28 +00:00
2022-06-15 09:47:38 +00:00
2023-11-13 13:23:04 +00:00
2024-08-13 15:28:34 +00:00
2023-06-29 09:32:04 +00:00
2024-04-29 16:24:51 +00:00
2024-04-29 16:24:51 +00:00
2023-10-30 14:43:46 +00:00
2024-06-07 06:41:51 +00:00
2024-06-07 09:47:26 +00:00
2024-07-30 15:07:25 +00:00
2024-07-30 15:07:25 +00:00
2024-07-30 15:07:25 +00:00
2024-06-07 06:41:51 +00:00
2024-07-30 15:07:25 +00:00
2023-05-03 11:09:26 +00:00
2023-03-12 17:28:14 +00:00
2023-09-05 11:37:32 +00:00
2023-08-22 13:48:09 +00:00
2024-02-08 14:34:04 +00:00
2022-06-15 09:47:38 +00:00
2023-12-14 21:01:04 +00:00
2023-12-14 21:01:04 +00:00
2022-08-03 14:16:35 +00:00
2022-09-09 10:44:17 +00:00
2022-09-09 10:44:17 +00:00
2024-07-23 17:23:45 +00:00
2023-11-13 13:23:04 +00:00
2023-04-21 11:19:37 +00:00
2022-10-12 11:23:22 +00:00
2023-11-13 13:23:04 +00:00
2023-03-24 07:44:18 +00:00
2023-03-24 07:44:18 +00:00
2024-06-07 06:41:51 +00:00
2024-01-22 18:27:38 +00:00
2023-03-24 07:44:18 +00:00
2024-03-08 09:45:12 +00:00
2024-05-24 20:19:35 +00:00
2024-06-07 06:41:51 +00:00
2024-06-07 06:41:51 +00:00
2024-04-03 10:13:33 +00:00
2024-02-08 14:34:04 +00:00
2022-11-14 12:10:06 +00:00
2024-04-20 07:02:50 +00:00
2024-04-20 07:02:50 +00:00
2024-01-19 15:37:32 +00:00
2022-06-15 09:47:38 +00:00
2024-07-29 07:17:14 +00:00
2022-05-30 13:05:03 +00:00
2024-07-08 15:33:47 +00:00
2024-07-16 09:21:06 +00:00
2024-05-08 15:07:53 +00:00
2023-11-13 13:23:04 +00:00
2022-06-15 09:47:38 +00:00
2023-01-30 20:09:07 +00:00
2023-03-22 09:10:27 +00:00
2024-04-22 08:56:31 +00:00
2024-04-22 08:56:31 +00:00
2023-11-03 12:32:14 +00:00
2024-07-03 13:42:49 +00:00
2024-08-16 14:34:37 +00:00
2023-11-13 13:23:04 +00:00
2024-04-22 08:56:31 +00:00
2024-07-29 07:17:14 +00:00
2024-07-29 07:17:14 +00:00
2024-03-19 10:25:18 +00:00
2023-12-07 21:46:56 +00:00
2023-12-05 15:44:43 +00:00
2024-04-22 08:56:31 +00:00
2024-06-07 06:41:51 +00:00
2024-04-22 08:56:31 +00:00
2024-04-22 08:56:31 +00:00
2024-04-22 08:56:31 +00:00
2024-06-07 09:47:26 +00:00
2022-11-11 10:29:25 +00:00
2022-11-11 10:29:25 +00:00
2024-06-18 08:04:03 +00:00
2024-06-07 06:41:51 +00:00
2024-04-22 08:56:31 +00:00
2024-04-22 08:56:31 +00:00
2024-07-09 10:30:26 +00:00
2024-06-07 06:41:51 +00:00
2023-11-13 13:23:04 +00:00
2023-02-10 12:24:47 +00:00
2024-06-07 06:41:51 +00:00
2024-06-18 08:04:03 +00:00
2024-06-07 09:47:26 +00:00
2024-06-07 09:47:26 +00:00
2022-12-14 11:00:17 +00:00
2022-12-14 11:00:17 +00:00
2024-06-18 08:05:28 +00:00
2024-06-18 08:05:28 +00:00
2024-06-07 09:47:26 +00:00
2024-06-18 08:05:28 +00:00
2023-11-13 13:23:04 +00:00
2024-01-25 21:56:08 +00:00
2024-07-03 12:27:55 +00:00
2024-04-29 16:24:51 +00:00
2023-06-15 15:53:29 +00:00
2023-06-15 15:53:29 +00:00
2024-06-05 08:59:49 +00:00
2024-06-05 08:59:49 +00:00
2024-06-05 08:59:49 +00:00
2024-04-25 07:54:28 +00:00
2024-06-05 08:59:49 +00:00
2024-06-07 06:41:51 +00:00
2024-04-25 07:54:28 +00:00
2024-01-26 06:08:28 +00:00
2024-06-05 08:59:49 +00:00
2023-11-13 13:23:04 +00:00
2024-06-07 06:41:51 +00:00
2023-08-28 12:36:39 +00:00
2023-11-13 13:23:04 +00:00
2024-03-15 08:58:28 +00:00
2024-03-15 08:58:28 +00:00
2024-03-15 08:58:28 +00:00
2024-07-30 15:07:25 +00:00
2024-07-30 15:07:25 +00:00
2024-07-30 15:07:25 +00:00
2024-07-30 15:07:25 +00:00
2024-07-30 15:07:25 +00:00
2024-07-30 15:07:25 +00:00
2024-07-30 15:07:25 +00:00
2024-07-30 15:07:25 +00:00
2024-05-27 12:51:11 +00:00
2024-06-07 06:41:51 +00:00
2024-06-05 08:59:49 +00:00
2023-05-03 11:09:26 +00:00
2024-02-08 14:34:04 +00:00
2023-09-18 10:09:02 +00:00
2023-09-18 10:09:02 +00:00
2023-09-18 10:09:02 +00:00
2023-11-23 10:40:56 +00:00
2024-08-19 05:17:18 +00:00
2023-11-08 10:24:10 +00:00
2023-11-08 10:24:10 +00:00
2024-07-08 15:33:47 +00:00
2024-03-15 08:58:28 +00:00
2024-02-27 17:46:18 +00:00
2023-05-24 12:26:56 +00:00
2023-05-24 12:26:56 +00:00
2023-05-24 12:26:56 +00:00
2023-10-06 12:25:37 +00:00
2024-02-08 12:52:58 +00:00
2024-02-08 12:52:58 +00:00
2023-11-13 13:23:04 +00:00
2024-04-25 07:54:28 +00:00
2024-04-25 07:54:28 +00:00
2023-11-13 13:23:04 +00:00
2023-03-24 07:44:18 +00:00
2023-03-24 07:44:18 +00:00
2023-11-13 13:23:04 +00:00
2023-03-24 07:44:18 +00:00
2023-03-24 07:44:18 +00:00
2022-06-15 09:47:38 +00:00
2022-09-09 10:44:17 +00:00
2023-11-13 13:23:04 +00:00
2024-05-16 10:22:23 +00:00
2024-06-07 06:41:51 +00:00
2024-05-16 10:22:23 +00:00
2024-02-08 14:34:04 +00:00
2024-02-08 14:34:04 +00:00