Commit graph

3946 commits

Author SHA1 Message Date
hackerman-kl
8bcdc2896c milan-avb: cmd-get-as-path: add command handler stub 2026-04-27 10:56:44 +00:00
hackerman-kl
2f4dbe3ca7 milan-avb: cmd-audio-mappings: add command handler stub 2026-04-27 10:56:44 +00:00
hackerman-kl
d9f224b122 milan-avb: cmd-start-stop-streaming: add command handler 2026-04-27 10:56:44 +00:00
hackerman-kl
6bf27b6c4e milan-avb: cmd-get-set-stream-info: add command handler 2026-04-27 10:56:44 +00:00
hackerman-kl
99c9248a17 milan-avb: cmd-get-counters: add header 2026-04-27 10:56:44 +00:00
hackerman-kl
6cc669e4e2 milan-avb: stream: Milan listener registrar and stream-output prep 2026-04-27 10:56:44 +00:00
hackerman-kl
d139b97a28 milan-avb: es-builder: allocate Milan wrapper for stream descriptors 2026-04-27 10:56:44 +00:00
hackerman-kl
e9e271ec30 milan-avb: aecp: dispatch Milan MVU vendor-unique commands 2026-04-27 10:56:44 +00:00
hackerman-kl
363418bee2 milan-avb: aecp-aem: stream-info dirty tracking and unsolicited counters 2026-04-27 10:56:44 +00:00
hackerman-kl
7f558a1a3b milan-avb: aecp-aem-state: add interface counters and descriptor storage 2026-04-27 10:56:44 +00:00
hackerman-kl
38f3cdf7cf milan-avb: aecp-aem: Milan flags_ex bitfield refactor 2026-04-27 10:56:44 +00:00
hackerman-kl
0a02161943 milan-avb: acmp: log state on incoming messages 2026-04-27 10:56:44 +00:00
hackerman-kl
b2a5f7f97e milan-avb: avdecc: add avb_log_state aggregator and detailed send error 2026-04-27 10:56:44 +00:00
hackerman-kl
18b61154cd milan-avb: acmp-milan-v12: log_state diagnostic and FSM refinements 2026-04-27 10:56:44 +00:00
hackerman-kl
b126943143 milan-avb: msrp: state logging, Milan listener_observed and log refinements 2026-04-27 10:56:44 +00:00
hackerman-kl
2cc60d6167 milan-avb: adp: add log_state diagnostic 2026-04-27 10:56:44 +00:00
hackerman-kl
e7f2fc9ab0 milan-avb: mrp: expose applicant/registrar state accessors 2026-04-27 10:56:44 +00:00
hackerman-kl
ca039e5e25 milan-avb: stream: track descriptor index in struct stream 2026-04-27 10:56:44 +00:00
hackerman-kl
e8e7f7a9fb milan-avb: mvrp: drop notify VID to debug log level 2026-04-27 10:56:44 +00:00
hackerman-kl
2d476cab79 milan-avb: msrp: gate listener Ready on talker registrar 2026-04-27 10:56:44 +00:00
hackerman-kl
080d4b6f09 milan-avb: msrp: capture listener rx param 2026-04-27 10:56:44 +00:00
hackerman-kl
2118aefcdd milan-avb: aecp-aem: NOT_IMPLEMENTED replies use CDL=12 2026-04-27 10:56:44 +00:00
hackerman-kl
5355671022 milan-avb: mrp: fix REG log notify label 2026-04-27 10:56:44 +00:00
hackerman-kl
e6f1245ffc milan-avb: cmd-get-counters: fix CDL field 2026-04-27 10:56:44 +00:00
hackerman-kl
5bc1eafd3e milan-avb: streams: seperate legacy-avb and milan-avb 2026-04-27 10:56:44 +00:00
hackerman-kl
6cb03f8e04 milan-avb: acmp: do not return 0xfffe as a guid in the case of a null peer-id 2026-04-27 10:56:44 +00:00
hackerman-kl
4cabb5842c module-avb: es_builder: re-enable the msrp on interface (domain) and mvrp 2026-04-27 10:56:44 +00:00
hackerman-kl
2013ded3cb modules-avb: milan: acmp: FAST_CONNECT is not working now without any non-volatile configuration 2026-04-27 10:56:44 +00:00
hackerman-kl
2e2c365d57 modules-avb: legacy-avb: use old way of init avb_interface 2026-04-27 10:56:44 +00:00
hackerman-kl
b2e45b8151 module-avb: milan: es_builder: ensure that the created for the milan differently than for the legacy-avb 2026-04-27 10:56:44 +00:00
hackerman-kl
c7f4108eff module-avb: milan: acmp: fix activate to work according to the Milan specication, just SRP 2026-04-27 10:56:44 +00:00
hackerman-kl
6c5c184e6d module-avb: milan: acmp: return IMCOMPATIBLE if the interface is invalid 2026-04-27 10:56:44 +00:00
hackerman-kl
fdcd818fba module-avb: milan: return if server endity-id is different than the talker_guid 2026-04-27 10:56:44 +00:00
hackerman-kl
b8b58c81f2 module-avb: milan: implement the acmp's talker 2026-04-27 10:56:44 +00:00
hackerman-kl
baec6f9e33 module-avb: milan: use the msrp and store the vlan_id 2026-04-27 10:56:44 +00:00
hackerman-kl
393a1809ca module-avb: milan: use the msrp etc... instead of duplicating things 2026-04-27 10:56:44 +00:00
hackerman-kl
45a94f58bd milan-avb: stream: initialisation of the msrp/mrp stream components 2026-04-27 10:56:44 +00:00
hackerman-kl
5b06b5457a milan-avb: msrp/acmp: talker failed can be handled now 2026-04-27 10:56:44 +00:00
hackerman-kl
f5e97f0f6b milan-avb: adjust the msrp/adp and acmp state machine to communicate talker discovery and srp reserveration 2026-04-27 10:56:44 +00:00
hackerman-kl
219adaa456 milan-avb: adjusting the msrp-domain to work accordingly to the milan specification 2026-04-27 10:56:44 +00:00
hackerman-kl
2746898e9a milan-avb: rework mrp join/begin:
* join/begin mrp protocol for attributes of mvrp and msrp within stream_activate.
 * Creation of the attribute done on stream creation during es_buidler
2026-04-27 10:56:44 +00:00
hackerman-kl
0309d598a1 milan-avb: use vlan and mac address from the stream itself 2026-04-27 10:56:44 +00:00
hackerman-kl
e9a51bd84f milan-avb: rename msrp attribute to stream_attr 2026-04-27 10:56:44 +00:00
hackerman-kl
42925490bd milan-avb: a SRP domain may be defined per interface, make it possiblie ot have multiple avb domain per interface 2026-04-27 10:56:44 +00:00
hackerman-kl
4856f85de2 first draft for ACMP/ timeout handling, and communication between SRP/ADP and the ACMP state machine 2026-04-27 10:56:44 +00:00
hackerman-kl
ad543e37f5 milan-avb: split the acmp module into milan and legacy-avb 2026-04-27 10:56:44 +00:00
hackerman-kl
9ee0ddf24f milan-avb: preparing acmp state machine dividing between milan and legacy avb 2026-04-27 10:56:44 +00:00
hackerman-kl
d46523e6ad module-avb: milan: introducing GET_DYNAMIC_INFO 2026-04-27 10:56:44 +00:00
Wim Taymans
42d51098ae security: validate recv length and use overflow-safe bounds in NetJack2 OPUS/INT
Memory Safety: High

The netjack2_recv_opus() and netjack2_recv_int() functions had two
issues:

1. Missing recv length validation: after recv(), neither function
   checked that the received data was at least sizeof(header) bytes.
   A short packet would cause the pointer to advance past received
   data, reading uninitialized VLA memory into the encoded buffer.

2. Integer overflow in bounds check: the expression
   (active_ports-1)*max_encoded + sub_cycle*sub_period_bytes + data_size
   uses sub_cycle from the network packet header. A large sub_cycle
   value can overflow the uint32_t multiplication, wrapping around to
   a small value and bypassing the encoded_size bounds check, leading
   to an out-of-bounds write into encoded_data.

Additionally, validate that the received data is large enough for the
active_ports * data_size memcpy to prevent reading past the buffer.

Fix by adding recv length checks, using spa_overflow_mul/add for the
bounds arithmetic, and validating recv'd data covers the copy region.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-27 12:47:55 +02:00
Wim Taymans
931505a0e4 security: validate packet length in AVB IEC 61883 stream handler
Input Validation: High

The on_socket_data() handler only checked that the received packet was
at least avb_packet_header size before casting to avb_packet_iec61883,
which is larger. A packet between these two sizes would cause
out-of-bounds reads when accessing iec61883 fields like data_len.

Additionally, handle_iec61883_packet() used the data_len field from the
packet to determine how many bytes to copy into the ring buffer without
checking that the claimed data_len didn't exceed the actual received
data. A crafted packet with an inflated data_len could cause an
out-of-bounds read from the receive buffer.

Fix by requiring the minimum packet size to cover both the ethernet
header and the iec61883 header, and by validating that the claimed
payload size doesn't exceed the received data length.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-27 12:37:54 +02:00