All of lore.kernel.org
 help / color / mirror / Atom feed
* pulse plugin crash when stream has a hole
       [not found] <1609155621883091927-webhooks-bot@alsa-project.org>
@ 2020-12-28 11:40 ` GitHub issues - edited
  0 siblings, 0 replies; 2+ messages in thread
From: GitHub issues - edited @ 2020-12-28 11:40 UTC (permalink / raw)
  To: alsa-devel

alsa-project/alsa-plugins issue #16 was edited from i-garrison:

Following up on this debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824850

Looks like this crash is caused by missing stream hole handling in pulse plugin. Pulseaudio change was done just before `pulseaudio-v3.0` release and this issue should be reproducible with all current versions: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/dfd44036b54d65314664622ff93dfd18eee03c7b quoting from there:
```
... let the caller decide how the holes should be handled, so
in case of holes, pa_stream_peek() will return NULL data pointer and
the length of the hole in the nbytes argument
```

Here in pulse plugin, if there is a hole in stream `pa_stream_peek` would return NULL buffer pointer but non-zero `frag_length` and later memcpy is happily trying to copy from NULL source:
https://github.com/alsa-project/alsa-plugins/blob/7028580da1db9a2362dd9b0631d7f667b373c313/pulse/pcm_pulse.c#L517-L534

Instead, pulse plugin should detect there is a hole by checking if `src_buf` is still NULL while `frag_length` is not zero, and adjust transfer result accordingly.

Issue URL     : https://github.com/alsa-project/alsa-plugins/issues/16
Repository URL: https://github.com/alsa-project/alsa-plugins

^ permalink raw reply	[flat|nested] 2+ messages in thread

* pulse plugin crash when stream has a hole
       [not found] <1609150547530627012-webhooks-bot@alsa-project.org>
@ 2020-12-28 10:15 ` GitHub issues - opened
  0 siblings, 0 replies; 2+ messages in thread
From: GitHub issues - opened @ 2020-12-28 10:15 UTC (permalink / raw)
  To: alsa-devel

alsa-project/alsa-plugins issue #16 was opened from i-garrison:

Following up on this debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824850

Looks like this crash is caused by missing stream hole handling in pulse plugin. Pulseaudio change was done just before `pulseaudio-v3.0` release and this issue should be reproducible with all current versions: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/dfd44036b54d65314664622ff93dfd18eee03c7b quoting from there:
```
... let the caller decide how the holes should be handled, so
in case of holes, pa_stream_peek() will return NULL data pointer and
the length of the hole in the nbytes argument
```

Here in pulse plugin, if there is a hole in stream `pa_stream_peek` would return NULL buffer pointer but non-zero `frag_length` and later memcpy is happily trying to copy from NULL source:
https://github.com/alsa-project/alsa-plugins/blob/7028580da1db9a2362dd9b0631d7f667b373c313/pulse/pcm_pulse.c#L517-L534

Instead, pulse plugin should detect there is a hole by checking if `src_buf` is still NULL while `frag_lenght` is not zero, and adjust transfer result accordingly.

Issue URL     : https://github.com/alsa-project/alsa-plugins/issues/16
Repository URL: https://github.com/alsa-project/alsa-plugins

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-28 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1609155621883091927-webhooks-bot@alsa-project.org>
2020-12-28 11:40 ` pulse plugin crash when stream has a hole GitHub issues - edited
     [not found] <1609150547530627012-webhooks-bot@alsa-project.org>
2020-12-28 10:15 ` GitHub issues - opened

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.