commit | 25fb83c6e0a4ff0a357d97539c3b795e951280d0 | [log] [tgz] |
---|---|---|
author | Leandro Pereira <leandro.pereira@intel.com> | Wed Apr 04 16:15:06 2018 -0700 |
committer | Andrew Boie <andrewboie@gmail.com> | Tue Apr 24 18:30:00 2018 -0700 |
tree | cb09ec39956bba50426511fc7e780623deb6d677 | |
parent | b4d67dcc46b40c0d1d7b76ee4d17217ae435714a [diff] |
drivers: i2c: Fix TOCTOU while transferring I2C messages All the mesages are checked with _SYSCALL_MEMORY() prior to calling the actual implementation function. However, a race condition might happen between the check and the call to _impl_i2c_transfer() itself. Copy the msgs vector to a locally allocated array and pass it to the transfer implementation. Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>