1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 19:12:45 +01:00
Commit Graph

11297 Commits

Author SHA1 Message Date
Marian Buschsieweke
ab116ec71c
sys/net/nanocoap: Fix sending bogus separate responses
When module `nanocoap_server_separate` is not used, the functions to
send separate responses are still provided, just in a broken version:
They will send the separate replies from a different endpoint than the
request was received at (even on machines with only one IP address, as
also the source port is randomized).

This changes the behavior to only provide the functions for separate
response when the do work, so that others will detect an invalid
configuration at compile time rather than at run time.

The documentation is duly updated.
2024-12-13 08:40:43 +01:00
Marian Buschsieweke
28753e3509
Merge pull request #21075 from maribu/sys/net/nanocoap/buffer-overflow-separate-response
sys/net/nanocoap: fix buffer overflow in separate response handling
2024-12-12 20:36:55 +00:00
Marian Buschsieweke
c7af4b25a6
sys/net/nanocoap: fix invalid RST messages
An RST message has no token, so don't reply with a token when sending
RST.

This also adds unit tests to ensure this this exact bug does not sneak
back in.
2024-12-12 14:28:28 +01:00
Marian Buschsieweke
6b1279348a
sys/fmt: add scn_buf_hex()
This adds a function to convert a hex string to a byte array.
2024-12-12 14:28:28 +01:00
Marian Buschsieweke
7a738d0e0b
sys/net/nanocoap: fix buffer overflow in separate response handling
When RFC 8974 support (module `nanocoap_token_ext`) is in use, the
request token may be longer than the buffer in the separate response
context is large. This adds a check to not overflow the buffer.

Sadly, this is an API change: Preparing the separate response context
can actually fail, so we need to report this with a return value.

The example application has been adapted to only proceed if the separate
reply context could have been prepared, and rather directly emit a
reset message if the token exceeds the static buffer.

Co-authored-by: benpicco <benpicco@googlemail.com>
2024-12-12 14:28:28 +01:00
mguetschow
c80058ee85
Merge pull request #21046 from netd-tud/psa-key-headers
sys/psa_crypto: Update key headers
2024-12-10 13:04:34 +00:00
Armin Wolf
7cabd3ee93 sys/psa_crypto: Split key attributes definitions into separate file
Split key attributes definitions into separate file, together with
some basic support macros and helper functions.

This allows PSA crypto backends to use this definitions without
pulling in all the other type definitions.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
2024-12-05 21:36:02 +01:00
Karl Fessel
737f675442
Merge pull request #18663 from Ollrogge/fido2_follow_up2
sys/fido2: follow up continued
2024-11-28 10:09:47 +00:00
Marian Buschsieweke
67a22dba5e
Merge pull request #19837 from HendrikVE/stdio_uart_add_flush_rx
sys/stdio_uart: add stdio_clear_stdin
2024-11-27 11:27:03 +00:00
Hendrik van Essen
6f9edfe7a2 sys/stdio_uart: add stdio_clear_stdin 2024-11-27 11:57:54 +01:00
benpicco
6f3f4256df
Merge pull request #21045 from benpicco/suit/coap_endpoints
suit: move CoAP endpoints to the example
2024-11-26 23:13:39 +00:00
Armin Wolf
dd81d185cd sys/psa_crypto: Split key definitions into separate files
Split key definitions into separate files, together with some basic
support macros.

This allows PSA crypto backends to use this definitions without
pulling in all the other type definitions.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
2024-11-26 20:01:09 +01:00
Benjamin Valentin
83569aa558 suit: move CoAP endpoints to the example
Those endpoints are very specific to the example and not
useful for general use.

Move them to the example's CoAP endpoints.
2024-11-26 19:49:20 +01:00
mguetschow
80a0681f45
Merge pull request #20906 from netd-tud/psa-headers
sys/psa_crypto: split algorithm definitions
2024-11-26 10:56:57 +00:00
benpicco
5e6e34e345
Merge pull request #21040 from mguetschow/stdio-available
sys/stdio: stdio_available is always false with missing stdin module
2024-11-26 08:58:02 +00:00
Mikolai Gütschow
57158285a1
sys/stdio: stdio_available is always false with missing stdin module 2024-11-25 16:19:34 +01:00
mguetschow
08c032a3f0
Merge pull request #21033 from JulianHolzwarth/pr/sys/evtimer/comment_xtimer
sys/evtimer/evtimer.c: change comment from xtimer to ztimer
2024-11-25 10:28:47 +00:00
Ollrogge
db95ef6f10 sys/fido2: Small fix to dependencies && cleanup 2024-11-25 11:03:03 +01:00
Ollrogge
7e0a86ba32 fido2/ctap: add test for ctap without transport layer 2024-11-25 11:03:03 +01:00
Ollrogge
eddb00ae42 fido2/ctap: Adjust ctap_mem code to work on native 2024-11-25 11:03:03 +01:00
Marian Buschsieweke
c700aa92d4
Merge pull request #21031 from benpicco/net_fixes-misc
drivers/at86rf215: return ENETDOWN when interface is down
2024-11-23 16:30:32 +00:00
JulianHolzwarth
c77d8a0bf2 sys/evtimer/evtimer.c: change comment from xtimer to ztimer 2024-11-22 21:14:02 +01:00
Benjamin Valentin
2a6b8a3fed gnrc_netif: use different error messages for can't queue packet 2024-11-22 19:50:20 +01:00
mguetschow
a9108a40dd
Merge pull request #20958 from maribu/sys/shell/xfa-reduce-overhead
sys/shell: reduce overhead of XFA shell commands
2024-11-22 14:03:57 +00:00
Marian Buschsieweke
a7e251509d
sys/shell: reduce overhead of XFA shell commands
We do not need to add an array of pointers to the shell commands, just
an array of shell commands is sufficient. This reduced the overhead of
XFA by `sizeof(void *)` per command.
2024-11-22 11:14:34 +01:00
Marian Buschsieweke
2be92b5e55
rust: bump rust-riot-wrappers 2024-11-22 11:14:34 +01:00
Benjamin Valentin
8cd85472c5 usbus/cdc_ecm: port to netdev_new_api 2024-11-21 19:14:16 +01:00
benpicco
2bce94a7c7
Merge pull request #21012 from benpicco/netdev_new_api-relax
netdev_new_api: allow `.send()` to return > 0 to signal synchronos send
2024-11-20 22:28:26 +00:00
Benjamin Valentin
a86411b81e drivers/netdev: allow .send() to return > 0 to signal synchronos send 2024-11-20 16:40:36 +01:00
Benjamin Valentin
83f5b261a8 sys/net/gnrc_pktbuf: detect use after free if canary is in metadata 2024-11-19 15:23:03 +01:00
Benjamin Valentin
ea1670ab0f sys/net/gnrc_pktbuf: move CANARY to header file 2024-11-19 15:23:03 +01:00
Benjamin Valentin
278e8f53b7 sys/net/gnrc_pktbuf: fail assertion if illegal memory was freed 2024-11-19 15:23:03 +01:00
benpicco
aee4c1ef9c
Merge pull request #20984 from benpicco/gnrc_pktsnip_t-shrink
sys/net/gnrc/pkt: use `uint8_t` for user count
2024-11-17 17:29:16 +00:00
Marian Buschsieweke
51f969d655
Merge pull request #20993 from benpicco/netdev_new_api-enhance
gnrc_netif: netdev_new_api implies TX end irq, no need to check it
2024-11-17 08:45:19 +00:00
Marian Buschsieweke
2adb4042b3
Merge pull request #20974 from benpicco/gnrc_pktbuf_static-double-free
sys/net/gnrc_pktbuf_static: add double free detection
2024-11-16 09:03:42 +00:00
Marian Buschsieweke
fbf5c66f78
Merge pull request #20983 from benpicco/gnrc_netif_netdev_new_api-leak
gnrc_netif: fix packet leak with gnrc_netif_pktq & netdev_new_api
2024-11-15 22:46:54 +00:00
Benjamin Valentin
300a936e42 gnrc: add comment about gnrc_pktbuf_hold() use 2024-11-15 16:59:08 +01:00
Benjamin Valentin
e8b3b4d3e4 gnrc_pktbuf: assert that user count does not exceed 255 2024-11-15 16:41:42 +01:00
Benjamin Valentin
8e915babc1 sys/test_utils: hide legacy events behind netdev_legacy_api 2024-11-15 14:09:18 +01:00
Benjamin Valentin
db2f3bd3dd sys/net/gnrc/pkt: use uint8_t for user count
It's very unlikely that a pkt snip will have more than 255 users.
Use a uint8_t here to save 4 bytes per snip as this now fits into
the ununsed struct padding.
2024-11-14 18:48:55 +01:00
Benjamin Valentin
f82c41e96f gnrc_netif: netdev_new_api implies TX end irq, no need to check it 2024-11-14 17:11:58 +01:00
Benjamin Valentin
8eef1c1170 sys/net/gnrc/netif: don't release snip with netdev_new_api 2024-11-14 11:57:58 +01:00
benpicco
70aa1ec81f
Merge pull request #20986 from mguetschow/stdio-cdc-acm-miss
sys/usb_cdc_acm_stdio: only submit and flush for non-empty buffer
2024-11-14 06:13:32 +00:00
Mikolai Gütschow
67edd6c417
sys/usb_cdc_acm_stdio: only submit and flush for non-empty buffer 2024-11-13 20:08:34 +01:00
Benjamin Valentin
3e8c7d0861 sys/endian: fix build with picolibc 2024-11-13 16:01:34 +01:00
Benjamin Valentin
b9b8c4a68f gnrc_netif: fix packet leak with gnrc_netif_pktq & netdev_new_api 2024-11-13 13:40:13 +01:00
Marian Buschsieweke
2623762c16
Merge pull request #20977 from maribu/net/grnc/tcp/select-netif
sys/net/gnrc/tcp: fix gnrc_tcp_open() netif handling
2024-11-13 05:31:00 +00:00
Marian Buschsieweke
b9ba3ee0b2
Merge pull request #20964 from maribu/tests/rust_libs/improve-test-robustness
sys/shell: cmds_json builtin command
2024-11-13 05:30:13 +00:00
Marian Buschsieweke
e714707b14
sys/net/gnrc/tcp: fix gnrc_tcp_open() netif handling
gnrc_tcp_open() previously would eventually fail with a timeout without
sending any data when no netif was specified and a link-local target
address was used. This fixes the behavior:

- If there is only one netif, we just pick that
- If there are multiple netifs, fail directly with `-EINVAL` rather than
  sending out nothing and waiting for a timeout.

Co-authored-by: benpicco <benpicco@googlemail.com>
2024-11-12 15:44:41 +01:00
Marian Buschsieweke
f0a88dcf56
sys/shell: add help_json builtin command
This command does the same as `help`, but provides a machine readable
JSON rather than a human readable table. It is only provided when the
(pseudo-)module `shell_builtin_cmd_help_json` is used.
2024-11-11 22:05:04 +01:00