mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-03 06:47:04 -04:00
security: fix division by zero in PulseAudio set_stream_buffer_attr
A client can create a stream with invalid sample_spec (rate=0) via format_info negotiation, then send SET_STREAM_BUFFER_ATTR before negotiation completes. fix_playback_buffer_attr divides by ss.rate, crashing the daemon. Reject buffer attr changes on streams that have not completed format negotiation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
cd7bb1e37d
commit
d3e1be8b6e
1 changed files with 1 additions and 1 deletions
|
|
@ -4593,7 +4593,7 @@ static int do_set_stream_buffer_attr(struct client *client, uint32_t command, ui
|
|||
commands[command].name, tag, channel);
|
||||
|
||||
stream = pw_map_lookup(&client->streams, channel);
|
||||
if (stream == NULL)
|
||||
if (stream == NULL || stream->create_tag != SPA_ID_INVALID)
|
||||
return -ENOENT;
|
||||
|
||||
if (command == COMMAND_SET_PLAYBACK_STREAM_BUFFER_ATTR) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue