1. 21 11月, 2012 1 次提交
  2. 15 2月, 2012 1 次提交
  3. 08 1月, 2012 1 次提交
    • X
      ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range() · 4fa0e81b
      Xi Wang 提交于
      A malicious USB device may feed in carefully crafted min/max/res values,
      so that the inner loop in parse_uac2_sample_rate_range() could run for
      a long time or even never terminate, e.g., given max = INT_MAX.
      
      Also nr_rates could be a large integer, which causes an integer overflow
      in the subsequent call to kmalloc() in parse_audio_format_rates_v2().
      Thus, kmalloc() would allocate a smaller buffer than expected, leading
      to a memory corruption.
      
      To exploit the two vulnerabilities, an attacker needs physical access
      to the machine to plug in a malicious USB device.
      
      This patch makes two changes.
      
      1) The type of "rate" is changed to unsigned int, so that the loop could
         stop once "rate" is larger than INT_MAX.
      
      2) Limit nr_rates to 1024.
      Suggested-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NXi Wang <xi.wang@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4fa0e81b
  4. 27 9月, 2011 1 次提交
  5. 18 5月, 2011 1 次提交
  6. 29 4月, 2011 1 次提交
  7. 10 1月, 2011 1 次提交
  8. 04 9月, 2010 1 次提交
    • C
      ALSA: usb-audio: fix detection of vendor-specific device protocol settings · a2acad82
      Clemens Ladisch 提交于
      The Audio Class v2 support code in 2.6.35 added checks for the
      bInterfaceProtocol field.  However, there are devices (usually those
      detected by vendor-specific quirks) that do not have one of the
      predefined values in this field, which made the driver reject them.
      
      To fix this regression, restore the old behaviour, i.e., assume that
      a device with an unknown bInterfaceProtocol field (other than
      UAC_VERSION_2) has more or less UAC-v1-compatible descriptors.
      
      [compile warning fixes by tiwai]
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Cc: Daniel Mack <daniel@caiaq.de>
      Cc: <stable@kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a2acad82
  9. 15 8月, 2010 1 次提交
    • D
      ALSA: sound/usb/format: silence uninitialized variable warnings · 38d7b08f
      Dan Carpenter 提交于
      Gcc complains that ret might be used uninitialized:
      
      sound/usb/format.c: In function ‘snd_usb_parse_audio_format’:
      sound/usb/format.c:354: warning: ‘ret’ may be used uninitialized in this function
      sound/usb/format.c:354: note: ‘ret’ was declared here
      sound/usb/format.c:414: warning: ‘ret’ may be used uninitialized in this function
      sound/usb/format.c:414: note: ‘ret’ was declared here
      
      I suppose it could be uninitialized if there is ever a UAC_VERSION_3
      released. Anyway this patch is worthwhile if only to silence the gcc
      warning.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Acked-by: NDaniel Mack <daniel@caiaq.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      38d7b08f
  10. 23 6月, 2010 1 次提交
  11. 12 6月, 2010 3 次提交
  12. 01 6月, 2010 1 次提交
    • D
      ALSA: usb-audio: parse clock topology of UAC2 devices · 79f920fb
      Daniel Mack 提交于
      Audio devices which comply to the UAC2 standard can export complex clock
      topologies in its descriptors and set up links between them.
      
      The entities that are defined are
      
       - clock sources, which define the end-leafs.
       - clock selectors, which act as switch to select one out of many
         possible clocks sources.
       - clock multipliers, which have an input clock source, and act as clock
         source again. They can be used to derive one clock from another.
      
      All sample rate changes, clock validity queries and the like must go to
      clock source elements, while clock selectors and multipliers can be used
      as terminal clock source.
      
      The following patch adds a parser for these elements and functions to
      iterate over the tree and find the leaf nodes (clock sources).
      
      The samplerate set functions were moved to the new clock.c file.
      Signed-off-by: NDaniel Mack <daniel@caiaq.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      79f920fb
  13. 27 5月, 2010 2 次提交
  14. 29 3月, 2010 1 次提交
  15. 12 3月, 2010 2 次提交
  16. 05 3月, 2010 3 次提交