1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys
Marian Buschsieweke 765dc3a299
sys/net/gcoap: reduce insanity of hack
gcoap contains a hack where a `coap_pkt_t` is pulled out of thin air,
parts of the members are left uninitialized and a function is called on
that mostly uninitialized data while crossing fingers hard that the
result will be correct. (With the current implementation of the used
function this hack does actually work.)

Estimated level of insanity: 😱😱😱😱😱

This adds to insane functions to get the length of a token and the
length of a header of a CoAP packet while crossing fingers hard that
the packet is valid and that the functions do not overread.

Estimated level of insanity: 😱😱😱

The newly introduced insane functions are used to replace the old
insane hack, resulting in an estimated reduction of insanity of 😱😱.

Side note: This actually does fix a bug, as the old code did not take
           into account the length of the extended TKL field in case of
           RFC 8974 being used. But that is a bug in the abused API,
           and not in the caller abusing the API.
2024-11-01 16:32:59 +01: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/psa_crypto: chacha20 oneshot gluecode 2024-10-17 10:25:59 +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 Merge pull request #20847 from benpicco/event_assert 2024-10-25 08:11:51 +00: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 sys/net/gcoap: reduce insanity of hack 2024-11-01 16:32:59 +01: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 sys/luid: luid_custom() use fixed width int 2024-10-28 14:51:44 +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 sys/matstat: fix compilation with newlib 2024-10-09 22:23:40 +02: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 sys/net/gcoap: reduce insanity of hack 2024-11-01 16:32:59 +01: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 sys/posix/pthread: Add pthread_attr_getstack and pthread_attr_setstack 2024-10-29 13:29:54 +00: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 Merge pull request #20720 from netd-tud/chacha20-glue-code-implementation 2024-10-29 16:52:30 +00: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 treewide: update rust-riot-wrappers 2024-10-24 09:57:36 +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 treewide/rust: cargo fmt 2024-10-02 22:17:08 +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 sys/usb: Use luid_base for stable USB serials 2024-10-29 09:40:22 +01: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
ztimer sys/ztimer: fix re-scheduling of timers 2024-10-18 14:52:11 -04: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