Skip to content
Commit 25fb83c6 authored by Leandro Pereira's avatar Leandro Pereira Committed by Andrew Boie
Browse files

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: default avatarLeandro Pereira <leandro.pereira@intel.com>
parent b4d67dcc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment