Commit graph

15292 commits

Author SHA1 Message Date
Wim Taymans
8344117e7b avb: free the ringbuffer 2026-05-04 18:43:56 +02:00
Wim Taymans
f91b98a812 stream: check buffer_id in reuse_buffer 2026-05-04 18:42:52 +02:00
Alyssa Ross
49ce385c44
test: move SPA_NORETURN attributes to header
Otherwise, when building with fortify-headers, I get an error because
the compiler doesn't know pwtest_ptr_notnull will not return if the
passed pointer is null, so it doesn't know the pointer subsequently
passed to memmove via pw_array_remove will be non-null.

	In file included from ../spa/include/spa/utils/defs.h:11,
	                 from ../spa/include/spa/utils/string.h:15,
	                 from ../test/pwtest.h:15,
	                 from ../test/test-array.c:7:
	In function ‘memmove’,
	    inlined from ‘array_test’ at ../test/test-array.c:66:2:
	/nix/store/9031y56lsf4mq177s68ql1axsf241r7j-fortify-headers-3.0.1/include/string.h:77:16: error: argument 1 is null but the corresponding size argument 3 value is [8, 18446744073709551615] [-Werror=nonnull]
	   77 |         return __orig_memmove(__d, __s, __n);
	      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	/nix/store/9031y56lsf4mq177s68ql1axsf241r7j-fortify-headers-3.0.1/include/string.h:77:16: warning: ‘__orig_memmove’ reading 8 or more bytes from a region of size 0 [-Wstringop-overread]
	In function ‘array_test’:
	cc1: note: source object is likely at address zero
	In file included from /nix/store/9031y56lsf4mq177s68ql1axsf241r7j-fortify-headers-3.0.1/include/stdlib.h:33,
	                 from ../spa/include/spa/utils/string.h:11:
	/nix/store/9031y56lsf4mq177s68ql1axsf241r7j-fortify-headers-3.0.1/include/string.h:69:1: note: in a call to function ‘__orig_memmove’ declared with attribute ‘access (read_only, 2, 3)’
	   69 | _FORTIFY_FN(memmove) void *memmove(void * _FORTIFY_POS0 __d,
	      | ^~~~~~~~~~~
2026-05-04 17:51:58 +02:00
Wim Taymans
96ef2728b8 alsa-plugin: handle allocation errors
Make sure we don't leak channel maps.
2026-05-04 16:35:02 +02:00
Wim Taymans
c263a52ab7 audioconvert: reuse hist_mem as window scratch space
Instead of allocating a potentially unsafe 1MB array on the stack to
store the window, reuse the hist_mem, which has more than enough space
as a scratch space for the window.
2026-05-04 16:26:20 +02:00
Wim Taymans
057ae16504 bluez5: handle some allocation failures 2026-05-04 14:27:34 +02:00
Wim Taymans
6539c2bf8c fix some allocation failures 2026-05-04 14:18:31 +02:00
Wim Taymans
8cf1164eb6 midifile: reject midi files with invalid values
>64 tracks will overflow the track array and a division of 0 will cause
a division by zero later.
2026-05-04 14:13:09 +02:00
Wim Taymans
c4b198962c jack-tunnel: pass bytes to jack_to_midi
When the buffer has n_samples, we have n_samples * sizeof(float) bytes
to fill with midi.
2026-05-04 13:51:55 +02:00
Wim Taymans
bd8eab3ffb raop: handle allocation error and avoid crash later 2026-05-04 13:46:09 +02:00
Wim Taymans
782986baa1 filter-graph: guard against overflow of graph input/output 2026-05-04 13:42:14 +02:00
Wim Taymans
ed33b4d877 jack: dlclose on errors 2026-05-04 13:20:00 +02:00
Wim Taymans
4cf5acf18d raop: free pending messages 2026-05-04 13:16:37 +02:00
Wim Taymans
7ab2b7d24a raop: handle asprintf errors 2026-05-04 13:16:25 +02:00
Wim Taymans
732df7b978 filter-graph: fix pipe2 errors
Also free the arguments and close the child side pipe ends.
2026-05-04 13:10:48 +02:00
Wim Taymans
a4d7607a88 raop: avoid division by 0 2026-05-04 12:26:08 +02:00
Wim Taymans
2993bf1722 filter-graph: limit lv2 ports
Limit the lv2 ports to 512 and check for allocation errors.
2026-05-04 12:16:26 +02:00
Wim Taymans
e423844f9b filter-graph: reject too many impulse response files 2026-05-04 12:12:01 +02:00
Wim Taymans
62dbd49f5a jack: fix some potential NULL pointer derefs
If the client has no pid property, don't try to atoi a NULL string.

If the : is stripped of a very long port name, don't return a NULL+1
string in port_short_name().

Don't deref a potential NULL port in debug log.
2026-05-04 12:04:08 +02:00
Wim Taymans
16ba0ef59b jack: guard again append without an event in the buffer 2026-05-04 11:57:05 +02:00
Wim Taymans
7dacdc8cc8 avb: bounds check the attribute encoding
Add a maxsize to the attribute encode functions and add checks that
they don't overwrite the provided buffer.
2026-05-04 10:47:52 +02:00
Wim Taymans
cda2e2ee17 rtp: fix ringbuffer overflow check
We write raw samples to the ringbuffer from the opus decode function so
compare the available space to the max amount of samples we can decode,
which is 2880 as passed to opus_decode.
2026-05-04 10:26:30 +02:00
Wim Taymans
17723bc00d avb: fix MAAP packet send
Actually send the ehaternet header data as well. The send was skipping
the ehternet header and reading past the packet end.
2026-05-04 10:21:41 +02:00
Wim Taymans
67b70c8d23 netjack2: do some sanity checks on the MTU
It needs to be large enough foer the header, udp overhead and a uint32_t
for each audio channel to be able to send the sync packet.

Avoid string oob read when debugging the packet.
2026-05-04 10:13:44 +02:00
Wim Taymans
5a8a3b5a54 vban: don't write too large midi packets 2026-05-04 09:56:30 +02:00
Wim Taymans
be6bfba8eb avb: check some allocation errors 2026-05-04 09:56:18 +02:00
Wim Taymans
32bb568225 avb: make sure to no blindly use the type as a command index 2026-05-04 09:55:35 +02:00
Wim Taymans
172f969650 avb: check packet sizes
Clamp packet len to the buffer size.

Reject packets with invalid data_len.
2026-05-04 09:53:33 +02:00
Wim Taymans
47deb75247 remote-node: check memory offsets and size
Check that the metadata, chunks and optionally the buffer data fit in
the memory.
2026-05-04 09:29:00 +02:00
hackerman-kl
7a826b1580 milan-avb: gptp: track request timing on CLOCK_MONOTONIC 2026-05-03 10:26:16 +02:00
hackerman-kl
4da6e39281 milan-avb: gptp: handle MANAGEMENT_ERROR_STATUS TLV as stale-data signal 2026-05-03 10:26:16 +02:00
hackerman-kl
09b3f0dc34 milan-avb: gptp: invalidate cached state when ptp4l stops responding 2026-05-03 10:26:16 +02:00
hackerman-kl
97436efe1e milan-avb: cmd-get-as-path: build [gm,...,local] and emit unsolicited GET_AS_PATH 2026-05-03 10:26:16 +02:00
hackerman-kl
ff3367dc05 milan-avb: aecp-aem: emit unsolicited GET_AVB_INFO when gPTP changes 2026-05-03 10:26:16 +02:00
hackerman-kl
e02a4854de milan-avb: gptp: query PATH_TRACE_LIST and store Announce path trace 2026-05-03 10:26:16 +02:00
hackerman-kl
55bb0b6a6a milan-avb: gptp: query CURRENT_DATA_SET for canonical is_grandmaster check 2026-05-03 10:26:16 +02:00
hackerman-kl
c877ea4243 milan-avb: gptp: rate-limit management requests to 375 ms 2026-05-03 10:26:16 +02:00
hackerman-kl
fc08d2444a milan-avb: gptp: send PTP management with majorSdoId=1 for gPTP profile 2026-05-03 10:26:16 +02:00
hackerman-kl
1b81dbab85 milan-avb: adding the ptp4l command line information 2026-05-03 10:26:16 +02:00
hackerman-kl
4b44c15768 milan-avb; introducing gptp/as_path interface specific dirty flags 2026-05-03 10:26:16 +02:00
hackerman-kl
21dd14618c milan-avb: update banner 2026-05-03 10:26:16 +02:00
hackerman-kl
46f9c5130e milan-avb: cmd-get-as-path: build path from gptp data 2026-05-03 10:26:16 +02:00
hackerman-kl
9f019a061d milan-avb: aecp-aem: source GET_AVB_INFO grandmaster from gptp 2026-05-03 10:26:16 +02:00
hackerman-kl
e9a1e50996 milan-avb: adp: refresh grandmaster_id from gptp on each advertise 2026-05-03 10:26:16 +02:00
hackerman-kl
231b0950c5 milan-avb: descriptors: derive AVB_INTERFACE clock_identity from entity_id 2026-05-03 10:26:16 +02:00
hackerman-kl
3f63b51fcc milan-avb: gptp: rework management I/O as non-blocking with sequence-id matching 2026-05-03 10:26:16 +02:00
hackerman-kl
0da747fd44 milan-avb: gptp: do not fail server creation on missing PTP socket 2026-05-03 10:26:16 +02:00
hackerman-kl
0b09fb2b1e milan-avb: gptp: initialise ret in the drain loop 2026-05-03 10:26:16 +02:00
hackerman-kl
21c4c59587 milan-avb: gptp: use entity_id for management source port id 2026-05-03 10:26:16 +02:00
hackerman-kl
1e9f89b638 milan-avb: gptp: emit gm_changed only when the GM actually changes 2026-05-03 10:26:16 +02:00