1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys
Benjamin Valentin 66fe083d9b nanocoap: always write at least 1 byte in coap_block2_finish()
The CoAP block option gets written twice:
First a 'dummy' value is written by `coap_opt_add_block2()`, later this gets
overwritten by the real option value by coap_block2_finish().

The problem arises when the size of the option changes.
If the option ends up smaller than the dummy, we have garbage bytes after the
real option value, corrupting the packet.

To mitigate this, always write at least one option byte (which will be a 0 byte)
to ensure the dummy data is overwritten.

fixes #20686
2024-09-07 16:11:23 +02:00
..
analog_util *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
app_metadata *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
arduino *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
auto_init treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
base64 *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
benchmark *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
bhp *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
bitfield *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
bloom *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
bus *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
can treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
cb_mux *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
checksum *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
chunked_ringbuffer *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
clif *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
coding *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
color *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
congure *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
cpp11-compat *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
cpp_new_delete *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
crypto sys/crypto: fix OCB mode 2024-06-11 18:26:14 +02:00
cxx_ctor_guards *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
debug_irq_disable *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
div *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
ecc *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
eepreg *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
embunit sys/embunit: return failure state in TextUIRunner_end() 2024-04-03 13:22:51 +02:00
entropy_source *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
event treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
evtimer *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
fido2 treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
fmt *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
frac *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
fs *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
fuzzing fuzzing: Add uri_parser fuzzer setup 2022-12-19 13:03:45 +01:00
hashes sys/psa_crypto: added sha3 glue code 2024-07-13 04:35:21 +02:00
include Merge pull request #20684 from fabian18/pr/fix_gcoap_observe_response_correlation 2024-08-26 14:11:59 +00:00
iolist *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
isrpipe sys/isrpipe/read_timeout: don't set up timer if data is available 2024-04-08 16:42:45 +02:00
libc *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
log_color *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
log_printfnoformat *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
luid *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
malloc_monitor sys: add malloc_monitor, deprecate malloc_tracing 2024-03-26 10:00:24 +01:00
malloc_thread_safe sys: add malloc_monitor, deprecate malloc_tracing 2024-03-26 10:00:24 +01:00
matstat *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
memarray *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
mineplex *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
net nanocoap: always write at least 1 byte in coap_block2_finish() 2024-09-07 16:11:23 +02:00
newlib_syscalls_default sys/*: expose periph/pm.h 2024-04-08 11:20:14 +02:00
od *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
oneway-malloc *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
phydat Merge pull request #20529 from Teufelchen1/deprecate/phydat_str 2024-04-04 11:24:04 +00:00
picolibc_syscalls_default sys/*: expose periph/pm.h 2024-04-08 11:20:14 +02:00
pipe *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
pm_layered *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
posix treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
preprocessor *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
progress_bar *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
ps core/thread: fix thread_measure_stack_free() 2024-05-31 19:54:10 +02:00
psa_crypto sys/psa_crypto: added sha3 glue code 2024-07-13 04:35:21 +02:00
puf_sram sys/puf_sram: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:54 +02:00
random sys/random: fix SHAxPRNG init_by_array 2024-05-31 23:29:09 +02:00
riotboot sys/slot_aux: add build system integration for AUX slot 2024-02-28 11:49:05 +01:00
rtc_utils *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
rust_riotmodules Merge pull request #20438 from MrKevinWeiss/pr/kconfig/dep/removal 2024-03-27 16:39:56 +00:00
rust_riotmodules_standalone rust: Update all locked versions 2024-08-22 17:49:39 +02:00
saul_reg *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
sched_round_robin *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
schedstatistics *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
sema *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
sema_inv *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
senml *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
seq *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
shell rust: Update to riot-wrappers 0.9 2024-08-22 17:33:40 +02:00
shell_lock *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
slot_aux sys/slot_aux: add build system integration for AUX slot 2024-02-28 11:49:05 +01:00
ssp *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
stdio sys/stdio: add common stdio module 2024-02-09 15:24:22 +01:00
stdio_nimble stdio_nimble: port to new interface 2024-02-09 15:24:22 +01:00
stdio_null stdio_null: port to new interface 2024-02-09 15:24:22 +01:00
stdio_rtt stdio_rtt: port to new interface 2024-02-09 15:24:22 +01:00
stdio_semihosting stdio_semihosting: port to new interface 2024-02-09 15:31:21 +01:00
stdio_uart stdio_uart: port to new interface 2024-02-09 15:24:22 +01:00
stdio_udp stdio_udp: port to new interface 2024-02-09 15:24:22 +01:00
suit treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
test_utils treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
timex *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
tiny_strerror *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
trace *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
trickle *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
tsrb *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
universal_address sys: Use size_t print format specifier 2023-12-21 12:02:19 +01:00
uri_parser *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
usb treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
usb_board_reset *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
ut_process *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
uuid *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
vfs sys/vfs: add vfs_readline() 2024-05-15 11:20:38 +02:00
vfs_util sys/vfs_util: add vfs_file_exists() 2024-05-15 11:20:38 +02:00
xtimer *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
zptr sys: zptr: initial commit 2020-02-11 13:59:59 +01:00
ztimer sys/ztimer: Remove the deprecated ztimer_now64 2024-08-20 20:52:37 +02:00
ztimer64 sys/ztimer64: fix build when PRIu64 is not defined 2024-05-24 19:19:40 +02:00
doc.txt sys/doc.txt: add sys_compression doxygen group 2023-02-27 15:09:08 +01:00
Kconfig *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Makefile sys: Add PSA Crypto Module 2023-08-31 14:38:49 +02:00
Makefile.dep nanocoap_fs: add nanoCoAP as VFS backend 2024-05-29 11:32:22 +02:00
Makefile.include sys/slot_aux: add build system integration for AUX slot 2024-02-28 11:49:05 +01:00