cip-dev.lists.cip-project.org archive mirror
 help / color / mirror / Atom feed
* ALSA: pcm: Broken commit in v4.4-st38
@ 2023-03-23 19:30 Alexander Grund
  0 siblings, 0 replies; only message in thread
From: Alexander Grund @ 2023-03-23 19:30 UTC (permalink / raw)
  To: cip-dev

Hi,
I found a bug in v4.4-st38 caused by
e8064dec769e6e0822e179107d0b5b3d2e03e181 "ALSA: pcm: Move rwsem lock
inside snd_ctl_elem_read to prevent UAF"

1) It introduces down_read/up_read around a call to snd_ctl_elem_read
however that is superflous: snd_ctl_elem_read already does that, so
the commit 56b88b50565c referenced by the above is already included
2) down_write/up_write around snd_ctl_elem_write causes a deadlock
because snd_ctl_elem_write does a down_read at the start. The latter
is probably (another) bug likely caused by missing upstream commit
becf9e5d553c2389d857a3c178ce80fdb34a02e1 "ALSA: control: code
refactoring for ELEM_READ/ELEM_WRITE operations " which removes that
lock. Maybe that should be included here too, it also removes the
locking in snd_ctl_elem_read which means 1) is no longer superflous

Best,
Alexander Grund


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-23 19:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 19:30 ALSA: pcm: Broken commit in v4.4-st38 Alexander Grund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).