<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/sound/usb, branch v5.8</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ALSA: usb-audio: Add implicit feedback quirk for SSL2</title>
<updated>2020-07-22T09:03:21+00:00</updated>
<author>
<name>Laurence Tratt</name>
<email>laurie@tratt.net</email>
</author>
<published>2020-06-21T07:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3da87ec67a491b9633a82045896c076b794bf938'/>
<id>3da87ec67a491b9633a82045896c076b794bf938</id>
<content type='text'>
As expected, this requires the same quirk as the SSL2+ in order for the
clock to sync. This was suggested by, and tested on an SSL2, by Dmitry.

Suggested-by: Dmitry &lt;dpavlushko@gmail.com&gt;
Signed-off-by: Laurence Tratt &lt;laurie@tratt.net&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200621075005.52mjjfc6dtdjnr3h@overdrive.tratt.net
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As expected, this requires the same quirk as the SSL2+ in order for the
clock to sync. This was suggested by, and tested on an SSL2, by Dmitry.

Suggested-by: Dmitry &lt;dpavlushko@gmail.com&gt;
Signed-off-by: Laurence Tratt &lt;laurie@tratt.net&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200621075005.52mjjfc6dtdjnr3h@overdrive.tratt.net
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Fix race against the error recovery URB submission</title>
<updated>2020-07-10T16:07:25+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-07-10T16:06:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9b7e5208a941e2e491a83eb5fa83d889e888fa2f'/>
<id>9b7e5208a941e2e491a83eb5fa83d889e888fa2f</id>
<content type='text'>
USB MIDI driver has an error recovery mechanism to resubmit the URB in
the delayed timer handler, and this may race with the standard start /
stop operations.  Although both start and stop operations themselves
don't race with each other due to the umidi-&gt;mutex protection, but
this isn't applied to the timer handler.

For fixing this potential race, the following changes are applied:

- Since the timer handler can't use the mutex, we apply the
  umidi-&gt;disc_lock protection at each input stream URB submission;
  this also needs to change the GFP flag to GFP_ATOMIC
- Add a check of the URB refcount and skip if already submitted
- Move the timer cancel call at disconnection to the beginning of the
  procedure; this assures the in-flight timer handler is gone properly
  before killing all pending URBs

Reported-by: syzbot+0f4ecfe6a2c322c81728@syzkaller.appspotmail.com
Reported-by: syzbot+5f1d24c49c1d2c427497@syzkaller.appspotmail.com
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200710160656.16819-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
USB MIDI driver has an error recovery mechanism to resubmit the URB in
the delayed timer handler, and this may race with the standard start /
stop operations.  Although both start and stop operations themselves
don't race with each other due to the umidi-&gt;mutex protection, but
this isn't applied to the timer handler.

For fixing this potential race, the following changes are applied:

- Since the timer handler can't use the mutex, we apply the
  umidi-&gt;disc_lock protection at each input stream URB submission;
  this also needs to change the GFP flag to GFP_ATOMIC
- Add a check of the URB refcount and skip if already submitted
- Move the timer cancel call at disconnection to the beginning of the
  procedure; this assures the in-flight timer handler is gone properly
  before killing all pending URBs

Reported-by: syzbot+0f4ecfe6a2c322c81728@syzkaller.appspotmail.com
Reported-by: syzbot+5f1d24c49c1d2c427497@syzkaller.appspotmail.com
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200710160656.16819-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: line6: Sync the pending work cancel at disconnection</title>
<updated>2020-07-10T14:29:38+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-07-10T13:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=68359a1ad8447c99732ebeab8c169bfed543667a'/>
<id>68359a1ad8447c99732ebeab8c169bfed543667a</id>
<content type='text'>
Recently syzkaller reported a UAF in LINE6 driver, and it's likely
because we call cancel_delayed_work() at the disconnect callback
instead of cancel_delayed_work_sync().  Let's use the correct one
instead.

Reported-by: syzbot+145012a46658ac00fc9e@syzkaller.appspotmail.com
Suggested-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/s5hlfjr4gio.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recently syzkaller reported a UAF in LINE6 driver, and it's likely
because we call cancel_delayed_work() at the disconnect callback
instead of cancel_delayed_work_sync().  Let's use the correct one
instead.

Reported-by: syzbot+145012a46658ac00fc9e@syzkaller.appspotmail.com
Suggested-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/s5hlfjr4gio.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: line6: Perform sanity check for each URB creation</title>
<updated>2020-07-10T14:29:18+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-07-10T13:33:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6e8a914ad619042c5f25a4feb663357c4170fd8d'/>
<id>6e8a914ad619042c5f25a4feb663357c4170fd8d</id>
<content type='text'>
LINE6 drivers create stream URBs with a fixed pipe without checking
its validity, and this may lead to a kernel WARNING at the submission
when a malformed USB descriptor is passed.

For avoiding the kernel warning, perform the similar sanity checks for
each pipe type at creating a URB.

Reported-by: syzbot+c190f6858a04ea7fbc52@syzkaller.appspotmail.com
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/s5hv9iv4hq8.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LINE6 drivers create stream URBs with a fixed pipe without checking
its validity, and this may lead to a kernel WARNING at the submission
when a malformed USB descriptor is passed.

For avoiding the kernel warning, perform the similar sanity checks for
each pipe type at creating a URB.

Reported-by: syzbot+c190f6858a04ea7fbc52@syzkaller.appspotmail.com
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/s5hv9iv4hq8.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Add implicit feedback quirk for RTX6001</title>
<updated>2020-07-07T09:46:18+00:00</updated>
<author>
<name>Pavel Hofman</name>
<email>pavel.hofman@ivitera.com</email>
</author>
<published>2020-07-03T10:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b6a1e78b96a5d7f312f08b3a470eb911ab5feec0'/>
<id>b6a1e78b96a5d7f312f08b3a470eb911ab5feec0</id>
<content type='text'>
USB Audio analyzer RTX6001 uses the same implicit feedback quirk
as other XMOS-based devices.

Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Tested-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/822f0f20-1886-6884-a6b2-d11c685cbafa@ivitera.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
USB Audio analyzer RTX6001 uses the same implicit feedback quirk
as other XMOS-based devices.

Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Tested-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/822f0f20-1886-6884-a6b2-d11c685cbafa@ivitera.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: add quirk for MacroSilicon MS2109</title>
<updated>2020-07-07T08:23:39+00:00</updated>
<author>
<name>Hector Martin</name>
<email>marcan@marcan.st</email>
</author>
<published>2020-07-02T07:14:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e337bf19f6af38d5c3fa6d06cd594e0f890ca1ac'/>
<id>e337bf19f6af38d5c3fa6d06cd594e0f890ca1ac</id>
<content type='text'>
These devices claim to be 96kHz mono, but actually are 48kHz stereo with
swapped channels and unaligned transfers.

Cc: stable@vger.kernel.org
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Link: https://lore.kernel.org/r/20200702071433.237843-1-marcan@marcan.st
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These devices claim to be 96kHz mono, but actually are 48kHz stereo with
swapped channels and unaligned transfers.

Cc: stable@vger.kernel.org
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Link: https://lore.kernel.org/r/20200702071433.237843-1-marcan@marcan.st
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Replace s/frame/packet/ where appropriate</title>
<updated>2020-06-30T17:47:02+00:00</updated>
<author>
<name>Alexander Tsoy</name>
<email>alexander@tsoy.me</email>
</author>
<published>2020-06-29T02:59:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b9fd2007c97413154e16bda01a6d5d5fc0c3bd44'/>
<id>b9fd2007c97413154e16bda01a6d5d5fc0c3bd44</id>
<content type='text'>
Replace several occurences of "frame" with a "packet" where appropriate.

Signed-off-by: Alexander Tsoy &lt;alexander@tsoy.me&gt;
Link: https://lore.kernel.org/r/20200629025934.154288-2-alexander@tsoy.me
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace several occurences of "frame" with a "packet" where appropriate.

Signed-off-by: Alexander Tsoy &lt;alexander@tsoy.me&gt;
Link: https://lore.kernel.org/r/20200629025934.154288-2-alexander@tsoy.me
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Fix packet size calculation</title>
<updated>2020-06-30T17:46:48+00:00</updated>
<author>
<name>Alexander Tsoy</name>
<email>alexander@tsoy.me</email>
</author>
<published>2020-06-29T02:59:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=695cf5ab401c1a368fed228ee4a624784cd17fc5'/>
<id>695cf5ab401c1a368fed228ee4a624784cd17fc5</id>
<content type='text'>
Commit f0bd62b64016 ("ALSA: usb-audio: Improve frames size computation")
introduced a regression for devices which have playback endpoints with
bInterval &gt; 1. Fix this by taking ep-&gt;datainterval into account.

Note that frame and fps are actually mean packet and packets per second
in the code introduces by the mentioned commit. This will be fixed in a
follow-up patch.

Fixes: f0bd62b64016 ("ALSA: usb-audio: Improve frames size computation")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208353
Signed-off-by: Alexander Tsoy &lt;alexander@tsoy.me&gt;
Link: https://lore.kernel.org/r/20200629025934.154288-1-alexander@tsoy.me
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit f0bd62b64016 ("ALSA: usb-audio: Improve frames size computation")
introduced a regression for devices which have playback endpoints with
bInterval &gt; 1. Fix this by taking ep-&gt;datainterval into account.

Note that frame and fps are actually mean packet and packets per second
in the code introduces by the mentioned commit. This will be fixed in a
follow-up patch.

Fixes: f0bd62b64016 ("ALSA: usb-audio: Improve frames size computation")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208353
Signed-off-by: Alexander Tsoy &lt;alexander@tsoy.me&gt;
Link: https://lore.kernel.org/r/20200629025934.154288-1-alexander@tsoy.me
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Fix OOB access of mixer element list</title>
<updated>2020-06-24T12:24:29+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-06-24T12:23:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=220345e98f1cdc768eeb6e3364a0fa7ab9647fe7'/>
<id>220345e98f1cdc768eeb6e3364a0fa7ab9647fe7</id>
<content type='text'>
The USB-audio mixer code holds a linked list of usb_mixer_elem_list,
and several operations are performed for each mixer element.  A few of
them (snd_usb_mixer_notify_id() and snd_usb_mixer_interrupt_v2())
assume each mixer element being a usb_mixer_elem_info object that is a
subclass of usb_mixer_elem_list, cast via container_of() and access it
members.  This may result in an out-of-bound access when a
non-standard list element has been added, as spotted by syzkaller
recently.

This patch adds a new field, is_std_info, in usb_mixer_elem_list to
indicate that the element is the usb_mixer_elem_info type or not, and
skip the access to such an element if needed.

Reported-by: syzbot+fb14314433463ad51625@syzkaller.appspotmail.com
Reported-by: syzbot+2405ca3401e943c538b5@syzkaller.appspotmail.com
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200624122340.9615-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The USB-audio mixer code holds a linked list of usb_mixer_elem_list,
and several operations are performed for each mixer element.  A few of
them (snd_usb_mixer_notify_id() and snd_usb_mixer_interrupt_v2())
assume each mixer element being a usb_mixer_elem_info object that is a
subclass of usb_mixer_elem_list, cast via container_of() and access it
members.  This may result in an out-of-bound access when a
non-standard list element has been added, as spotted by syzkaller
recently.

This patch adds a new field, is_std_info, in usb_mixer_elem_list to
indicate that the element is the usb_mixer_elem_info type or not, and
skip the access to such an element if needed.

Reported-by: syzbot+fb14314433463ad51625@syzkaller.appspotmail.com
Reported-by: syzbot+2405ca3401e943c538b5@syzkaller.appspotmail.com
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200624122340.9615-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: usb-audio: add quirk for Samsung USBC Headset (AKG)</title>
<updated>2020-06-23T14:13:49+00:00</updated>
<author>
<name>Macpaul Lin</name>
<email>macpaul.lin@mediatek.com</email>
</author>
<published>2020-06-23T11:03:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a32a1fc99807244d920d274adc46ba04b538cc8a'/>
<id>a32a1fc99807244d920d274adc46ba04b538cc8a</id>
<content type='text'>
We've found Samsung USBC Headset (AKG) (VID: 0x04e8, PID: 0xa051)
need a tiny delay after each class compliant request.
Otherwise the device might not be able to be recognized each times.

Signed-off-by: Chihhao Chen &lt;chihhao.chen@mediatek.com&gt;
Signed-off-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1592910203-24035-1-git-send-email-macpaul.lin@mediatek.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've found Samsung USBC Headset (AKG) (VID: 0x04e8, PID: 0xa051)
need a tiny delay after each class compliant request.
Otherwise the device might not be able to be recognized each times.

Signed-off-by: Chihhao Chen &lt;chihhao.chen@mediatek.com&gt;
Signed-off-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1592910203-24035-1-git-send-email-macpaul.lin@mediatek.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
