zephyr/subsys
Trond Einar Snekvik 4fbd0cb0ca Bluetooth: Mesh: Perform replay check on SeqAuth
To prevent the transport layer from accepting duplicate or out of order
segmented messages, add an RPL-like check for the SeqAuth of the
segmented messages when their context is allocated. This prevents
duplicate receives of the same segmented messages in the case where a
single source address sends two segmented messages in parallel (to two
different addresses):

Previously, when receiving two segmented messages, the first message
would go through to the access layer, then the second. Then, if the
transport layer received any repeated segments for the first message, it
would fail to identify the SeqAuth as old, as all its segments were of
new sequence numbers, and the "already complete SDU" check would only
look at the second message. Thus, the segmented message got processed
again and passed to the access layer, even though it was a duplicate.

To solve this, we need a mechanism like RPL, but only for the segmented
messages' SeqAuth. We cannot re-use the actual RPL mechanism, as it
can't support the scenario provoked by the "blocking tx" mechanism in
transport. This mechanism allocates the SeqAuth when the message is
first passed to the transport layer. The ongoing message that caused the
block would keep sending segments with higher sequence numbers than
the blocked message got, which will cause the blocked message to fail
the RPL check.

This patch adds a parallel SeqAuth mechanism to the RPL module, which
only deals with the SeqAuth of the segmented messages. This list gets
checked when the segmented message is first allocated, in the same
manner as the general RPL mechanism. The storage gets hooked into the
RPL mechanism, by adding a separate seg field to each RPL entry.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-03-11 12:36:04 +02:00
..
bluetooth Bluetooth: Mesh: Perform replay check on SeqAuth 2021-03-11 12:36:04 +02:00
canbus canbus: canopen: program: read flash in 32 byte chunks 2021-01-20 14:18:03 -06:00
console kernel: sem: add K_SEM_MAX_LIMIT 2021-03-05 08:13:53 -06:00
cpp
debug debug: coredump: improve delayed logging 2021-03-09 07:04:56 -05:00
demand_paging mmu: backing stores reserve page fault room 2021-01-23 19:47:23 -05:00
dfu modules: introduce MCUBOOT_BOOTUTIL module 2021-01-14 18:03:38 +01:00
disk disk: stm32: Select `USE_STM32_HAL_SD_EX` on stm32l4 2021-02-24 18:10:09 -06:00
emul emul: Add an emulator for the eSPI Host 2021-01-20 17:49:19 -05:00
fb
fs fs: shell: Remove unneeded flags from fs_open calls 2021-03-04 06:10:58 -05:00
ipc ipc: Make log level configurable for RPMsg service and backend 2021-03-06 09:09:50 -06:00
jwt
logging logging: fix TOCTTOU issue in z_log_hexdump_from_user 2021-03-10 06:09:38 -05:00
lorawan lorawan: add callback for datarate changes 2021-02-28 16:36:57 -05:00
mgmt mgmt/osdp: Fix coverity identified logical dead-code 2021-03-10 10:15:48 -05:00
net net: dhcpv4: The client needs info about network interfaces 2021-03-11 12:24:10 +02:00
power power: Get rid of deep sleep and sleep concepts 2021-03-07 07:59:53 -05:00
random random: ctr_drbg: Fix the error path in sys_csrand_get 2020-12-01 10:20:06 -06:00
settings settings: Handle unhandled error 2021-02-03 08:37:11 -05:00
shell shell: kernel: also print the thread entry pointer 2021-03-08 12:52:47 +01:00
stats
storage storage/stream/flash: Failed write of reminder rewinds buffer offset 2021-03-03 11:40:11 +03:00
testsuite ztest: Added support to return data via mock 2021-03-09 07:09:13 -05:00
timing timing: fix timing_stop() ref counting 2021-01-04 12:15:30 +01:00
tracing tracing: add RAM backend 2021-03-06 07:33:59 -05:00
usb kernel: sem: add K_SEM_MAX_LIMIT 2021-03-05 08:13:53 -06:00
CMakeLists.txt demand_paging: add infra for demand paging modules 2021-01-23 19:47:23 -05:00
Kconfig demand_paging: add infra for demand paging modules 2021-01-23 19:47:23 -05:00