Commit Graph
3000 Commits
Author SHA1 Message Date
Jon Shallow eba20a41eb RIOT: Fix building against the latest RIOT code 2026-03-16 16:03:42 +00:00
Jon Shallow f6e40a713c coap_oscore.c: Fix coap_parse_oscore_conf_mem() memory leak 2026-03-16 16:00:55 +00:00
Jon Shallow f538e7ee12 configure.ac: Abstract WARNINGs from config.log for summary report
Aids troubleshooting.
2026-03-16 16:00:00 +00:00
Jon Shallow 2f0d9c7457 ChangeLog: Include CVE fixed in 4.3.5a 2026-03-16 15:54:26 +00:00
Mahavir Jain 1c26ef352a feat(mbedtls): add support for PSA crypto interface
This change adds in the compatibility with the mbedtls-4.0 release.
This release has deprecated the classic mbedtls crypto APIs in favour
of standardized PSA crypto APIs.

For more information please refer to:
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-4.0.0
2026-01-09 09:49:11 +00:00
Jon Shallow 4e42d0f297 Proxy: Fix Reverse proxy 2025-12-30 10:54:33 +00:00
Jon Shallow 191499fda9 coap_uri.c: Fix off by one checking error 2025-12-30 10:44:26 +00:00
Jon Shallow 95406a27f3 configure.ac: Fix observe-persist support 2025-12-06 16:04:43 +00:00
Jon Shallow 53d2a8f95c multi-threading: Fix no_recursive_check issue 2025-12-06 16:04:18 +00:00
Jon Shallow e3fdcdcfbd ChangeLog: Update with fixed CVEs v4.3.5a 2025-11-26 11:47:47 +00:00
Jon Shallow 6634b334e8 coap_wolfssl.c: Do more error checking 2025-11-26 11:47:47 +00:00
Jon Shallow 2d260b9301 coap_mbedtls.c: Add in more error checks 2025-11-26 10:01:51 +00:00
Jon Shallow 31d79475b0 coap_gnutls.c: Properly handle error conditions 2025-11-26 10:01:45 +00:00
Jon Shallow d9a600edb9 Bug fix update to 4.3.5a 2025-11-25 16:12:20 +00:00
Jon Shallow 079fbbcaba coap_io.c: Cleanup MinGW builds
Move the MinGW #if tests to after where mswsock.h is included.

Tidy up documentation.

Tested against MSYS2 UCRT64, CLANG64, MINGW32 and MINGW64 on Windows 11.
Fixed a couple of minor build issues found.
2025-11-25 16:12:20 +00:00
Jon Shallow f3133e87f6 coap_io.c: Support MinGW build with _WIN32_WINNT == 0x0a00 2025-11-25 16:12:20 +00:00
Jon Shallow b2e10d1d1b MinGW: Fix latest MinGW support build 2025-11-25 16:12:20 +00:00
Jon Shallow 923a1a8f93 coap_uri.c: Fix sending Uri-Host option
Ipv6 Hosts with %interface suffix were incorrectly getting sent
with a Uri-Host option which included the &interface as well.
2025-11-25 10:29:50 +00:00
Jon Shallow 285eb02671 coap-rd.c: Sanity check POST query lengths 2025-11-25 10:29:50 +00:00
Patryk Jarosz 9d9b941c40 fixed memory leak coap_send 2025-11-25 10:29:36 +00:00
Jon Shallow bdbcf29bd1 coap_session.c: Fix GCC array bounds warning for memcpy
Note assert() added from #1209 has now been removed as not needed by #1628,
and if NDEBUG is defined then the assert() would have been a noop anyway.
2025-11-25 09:59:39 +00:00
Jon Shallow 054a55cbd6 coap_openssl.c: Check return values in case internal OpenSSL issue
And other other OpenSSL updates.
2025-09-27 15:24:42 +01:00
Jon Shallow 5fdd219118 testdriver: Suppress log Warning when error detecting 2025-09-20 14:04:03 +01:00
Jon Shallow 88f8c2e01f CI: Fix CI windows-2025 ms-build image build 2025-09-20 14:04:03 +01:00
Jon Shallow d2d9bd2b6d coap_uri.c: Fix parsing Unix Domains 2025-09-20 14:04:03 +01:00
Jon Shallow cc9aba6e01 coap_address.c: Validate length of provided host name
Host names larger than 255 bytes will cause an internal buffer overflow.

Hostnames provided to coap_resolve_address_info() now have their length validated.

Discovered by SecMate (https://secmate.dev).

Sanity check host lengths when parsing a CoAP URI when using the coap_split_uri()
function.
2025-09-16 11:41:41 +01:00
Jon Shallow af54b3d826 coap_session.c Fix CID update check 2025-09-16 11:41:41 +01:00
Jon Shallow 84d2b94421 CMakeLists.txt: Remove need for deprecated CMP0115 2025-09-16 11:41:41 +01:00
Jon Shallow d56fb48bff OSCORE: Fix OSCORE configuration file parsing issue
With a large boolean parameter value, (longer than "false"), memory
would be read past the "true" or "false" string boundaries in the ".rodata"
section when doing a memcmp(), potetially causing the application to crash
when calling coap_new_oscore_conf() with a specially crafted configuration
file.

It also can provide a mechanism to determine the byte values following the
"true" or "false" string boundaries which could lead to accessing sensitive
information. The standard libcoap library does not have defined keys or
certificates. This can only be done by a specially crafted local application.

Discovered by SecMate (https://secmate.dev).

Now fixed.
2025-09-16 11:41:41 +01:00
Jon Shallow 216802874b coap_block.c: Stop premature deletion of lg_srcv 2025-09-16 11:41:41 +01:00
Jon Shallow 959a0ba746 coap_mbedtls.c: Fix SNI hostname definition if not provided
MbedTLS based PKI clients may report

SSL - Attempt to verify a certificate without an expected hostname.
This is usually insecure.  In TLS clients, when a client authenticates a
server through its certificate, the client normally checks three things: ....

The application provided client_sni may have been removed as per
https://datatracker.ietf.org/doc/html/rfc6066#section-3

   Literal IPv4 and IPv6 addresses are not permitted in "HostName".

and so MbedTLS is now explicitly told that therw is no hostname.
2025-09-16 11:41:41 +01:00
Jon Shallow 33ad2707ab coap_session_mfree: Check for lg_crcv all cleared out if failure
Call to coap_cancel_observe_lkd() may cause session->lg_crcv to be cleared
out if transmission failure.
2025-09-16 11:41:41 +01:00
Jon Shallow bcf7d62342 RIOT: Fix building RIOT with RIOT's utlist.h change 2025-09-16 11:41:41 +01:00
Jon Shallow e2c57e1857 RIOT: Move examples to new directory structures 2025-09-16 11:41:41 +01:00
Jon Shallow 528402312e RIOT: Fix examples client issue
Bring the code up to the latest libcoap spec.
2025-09-16 11:41:41 +01:00
Jon Shallow f7cae1614a client code: Make sure static variables are re-initialized if needed
For embedded applications that can call the 'main()' function multiple
times, they  need to have any statically (globally) defined variables
reset to their default values.
2025-09-16 11:41:41 +01:00
Jon Shallow 993c12ac92 Copyright: Update to 2025 where appropriate 2025-09-16 11:41:41 +01:00
Jon Shallow b1ae24d4ce CIFuzz: Make sure libcoap is running when calling coap_delete_pdu() 2025-09-16 11:41:41 +01:00
Jon Shallow eb119c6ddb coap_block.c: Handle missing Size1 option when using Block1 2025-09-16 11:41:41 +01:00
Jon Shallow ba42209ed3 coap_digest_free: Handle NULL pointer 2025-09-15 17:21:10 +01:00
Jon Shallow ba90416186 coap_net.c: Fix TCP boundary read condition
Increment session->partial_read correctly.
2025-09-15 17:20:42 +01:00
Jon Shallow 7cf7465b78 Release 4.3.5: Fix SO and ABI version for new release v4.3.5 2024-09-06 11:13:56 +01:00
Jon Shallow 0d240530b4 Release 4.3.5: Release 4.3.5 2024-09-06 09:47:22 +01:00
Jon Shallow 493b503bca Zephyr: Fix k_realloc build errors for zephyr < 3.7.0 2024-09-04 15:17:06 +01:00
Jon Shallow eaff6928d6 Coverity-Scan: Fix CID 1599559-1599562 2024-09-04 12:08:47 +01:00
@pawel.szwarnowski abd0a027db Use Zephyr heap for Zephyr targets 2024-08-28 15:18:53 +01:00
Mario Kicherer 1c97907f2f coap_net.h: add ifdef WITH_LWIP around lwip functions 2024-08-27 11:59:23 +01:00
Daniel Mangum a705e04ced man: fix typo in logging documentation
Fixes small typo in logging documentation.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-08-27 09:10:22 +01:00
Jon Shallow c2b34daa9b mcast_loop: Drop mcast packet that server sent on different socket
Server enabled for mcast receipt.  When the server is acting as a proxy
sends a mcast packet out over a slave client type socket, it receives
the mcast packet on the server socket (which could then be forward out
of the client socket....).

This change prevents the server socket from passing up the libcoap stack
a mcast packet that it knows the client socket is sending.
2024-08-23 10:51:20 +01:00
Jon Shallow e220c371be coap.h: Remove need for different coap.h files for different OS
./autogen.sh and ./configure no longer need to be run prior to running
make for Contiki, LwIP or RIOT from the appropriate examples sub-directory.

scripts/fix_version.sh now handles updating coap.h for the different
LIBCOAP_ and PACKAGE_ definitions.
2024-08-23 10:39:37 +01:00