1. 27 1月, 2010 3 次提交
    • S
      firewire: core: fix use-after-free regression in FCP handler · 281e2032
      Stefan Richter 提交于
      Commit db5d247a "firewire: fix use of multiple AV/C devices, allow
      multiple FCP listeners" introduced a regression into 2.6.33-rc3:
      The core freed payloads of incoming requests to FCP_Request or
      FCP_Response before a userspace driver accessed them.
      
      We need to copy such payloads for each registered userspace client
      and free the copies according to the lifetime rules of non-FCP client
      request resources.
      
      (This could possibly be optimized by reference counts instead of
      copies.)
      
      The presently only kernelspace driver which listens for FCP requests,
      firedtv, was not affected because it already copies FCP frames into an
      own buffer before returning to firewire-core's FCP handler dispatcher.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      281e2032
    • S
      firewire: cdev: add_descriptor documentation fix · 6d3faf6f
      Stefan Richter 提交于
      struct fw_cdev_add_descriptor.length is in quadlets, not in bytes.
      Also remove any doubts about the endianess of descriptor data.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      6d3faf6f
    • S
      firewire: core: add_descriptor size check · e300839d
      Stefan Richter 提交于
      Presently, firewire-core only checks whether descriptors that are to be
      added by userspace drivers to the local node's config ROM do not exceed
      a size of 256 quadlets.  However, the sum of the bare minimum ROM plus
      all descriptors (from firewire-core, from firewire-net, from userspace)
      must not exceed 256 quadlets.
      
      Otherwise, the bounds of a statically allocated buffer will be
      overwritten.  If the kernel survives that, firewire-core will
      subsequently be unable to parse the local node's config ROM.
      
      (Note, userspace drivers can add descriptors only through device files
      of local nodes.  These are usually only accessible by root, unlike
      device files of remote nodes which may be accessible to lesser
      privileged users.)
      
      Therefore add a test which takes the actual present and required ROM
      size into account for all descriptors of kernelspace and userspace
      drivers.
      
      Cc: stable@kernel.org
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      e300839d
  2. 22 1月, 2010 3 次提交
  3. 21 1月, 2010 34 次提交