summaryrefslogtreecommitdiff
path: root/sound/pci/rme9652
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2021-03-25 10:32:50 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2021-05-20 11:52:58 +0300
commit22c7a18ed5f007faccb7527bc890463763214081 (patch)
treeff6c78e7cb5422c4784394bf043be468687255ea /sound/pci/rme9652
parentb106776080a1cf953a1b2fd50cb2a995db4732be (diff)
thunderbolt: usb4: Fix NVM read buffer bounds and offset issue
Up to 64 bytes of data can be read from NVM in one go. Read address must be dword aligned. Data is read into a local buffer. If caller asks to read data starting at an unaligned address then full dword is anyway read from NVM into a local buffer. Data is then copied from the local buffer starting at the unaligned offset to the caller buffer. In cases where asked data length + unaligned offset is over 64 bytes we need to make sure we don't read past the 64 bytes in the local buffer when copying to caller buffer, and make sure that we don't skip copying unaligned offset bytes from local buffer anymore after the first round of 64 byte NVM data read. Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4") Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'sound/pci/rme9652')
0 files changed, 0 insertions, 0 deletions